Author Topic: How to get Libpng work on Visual Studio C++ Express edition  (Read 8264 times)

0 Members and 1 Guest are viewing this topic.

Offline kypho

  • C= 64
  • **
  • Posts: 26
  • Karma: 1
    • View Profile
Hi everyone.

I have problems getting Libpng work with Visual Studio. I cannot succeed on compiling PNGTEST. It gives me this: Project : error PRJ0019: A tool returned an error code from "Testing...". I really am not sure if I have installed it right. I unpacked it to my projects folder (also zlib). I also tried to copy libpng13d.dll libpng13d.lib to my lib folder. What I have also done was that I change DLL ASM Debug to DLL Debug. I would be happy if someone there knows about this and could help me to get this properly running, but now I go to cook some Thai food ;)

- Kypho, junior c++ freak O0

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
I do suggest you to use this d3dx9 function to load image. You will be able to load various image format, like: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga

Anyway you can post your source/project code or more info about the error message produced by VC++, I'm sure someone will help you.
« Last Edit: March 07, 2008 by rbraz »
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
It sounds like you've got the places for things a bit mixed up.  That error occurs when VS can't find all the DLLs it needs on the path.

Jim
Challenge Trophies Won:

Offline kypho

  • C= 64
  • **
  • Posts: 26
  • Karma: 1
    • View Profile
This was all I get from the error :/ I know that this libpng is a library for handling png files in c++ and now I know that you can also use directx for that same thing. The reason why I want to use this is to use it in the "basic window setup" source code (provided in this forum), 'cos I guess it wanted to use libpng? Or can I use directx with that also?

- Kypho


Build Log      Build started: Project: pngtest, Configuration: DLL Debug|Win32
 Command Lines      Creating temporary file "c:\Documents and Settings\Ana\My Documents\Visual Studio 2005\Projects\PNG\projects\visualc71\Win32_DLL_Debug\Test\BAT0000012448244.bat" with contents
[
@echo off

set path=.\Win32_DLL_Debug\Test\..;.\Win32_DLL_Debug\Test\..\ZLib

c:\Documents and Settings\Ana\My Documents\Visual Studio 2005\Projects\PNG\projects\visualc71\Win32_DLL_Debug\Test\pngtest.exe ..\..\pngtest.png .\Win32_DLL_Debug\Test\pngout.png



if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Testing..."

exit 1

:VCEnd
]
Creating command line """c:\Documents and Settings\Ana\My Documents\Visual Studio 2005\Projects\PNG\projects\visualc71\Win32_DLL_Debug\Test\BAT0000012448244.bat"""
 Output Window      Testing...
'c:\Documents' is not recognized as an internal or external command,
operable program or batch file.
Project : error PRJ0019: A tool returned an error code from "Testing..."
 Results      Build log was saved at "file://c:\Documents and Settings\Ana\My Documents\Visual Studio 2005\Projects\PNG\projects\visualc71\Win32_DLL_Debug\Test\BuildLog.htm"
pngtest - 1 error(s), 0 warning(s)
 

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Quote
Creating command line """c:\Documents and Settings\Ana\My Documents\Visual Studio 2005\Projects\PNG\projects\visualc71\Win32_DLL_Debug\Test\BAT0000012448244.bat"""
 Output Window      Testing...
'c:\Documents' is not recognized as an internal or external command,
You're passing a wrong path to command line, anyway whats is that "BAT0000012448244.bat" archive ???
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Somehow you are missing the "" round a path, so instead of seeing

"c:\documents and settings"

as one thing, it's seeing 3 things

c:\documents
and
settings

Quote
The reason why I want to use this is to use it in the "basic window setup" source code (provided in this forum), 'cos I guess it wanted to use libpng? Or can I use directx with that also?
You can mix the two samples together (basically just add the two files together) with no problems.  In fact you need a window handle to use the directx code!

Quote
anyway whats is that "BAT0000012448244.bat" archive
I'm pretty sure it's a temp file used by msbuild.

Jim
Challenge Trophies Won:

Offline kypho

  • C= 64
  • **
  • Posts: 26
  • Karma: 1
    • View Profile
Okay :) Thanks a lot guys!

Offline kypho

  • C= 64
  • **
  • Posts: 26
  • Karma: 1
    • View Profile
Somehow you are missing the "" round a path, so instead of seeing

"c:\documents and settings"

as one thing, it's seeing 3 things

c:\documents
and
settings


I tried to add "" to paths in tools/projects and solutions but it didn't let me do that :/ I have no idea where is this path located.
So seems again that more guidance is needed. Where actually I should fix this path?

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
If you zip up the entire package and either post it here or PM it to me I will have a look - it's impossible to tell exactly what's wrong with the information you've posted.

Jim
Challenge Trophies Won: