简体   繁体   中英

Dev-C++ and libpng. Anyone know how to make it work,

I'm struggling to integrate pnglib into my dev-C++ project.

I used the package manager to install the pnglib and zlib with Dev-C++. That was the easy part. I then struggled hard to work out how to use those packages in my project. Couldn't find any documentation/tutorial on this, but finally was able to compile and link the project, but executing the program resulted in the error message "The application was unable to start correctly (0xc000007b). Click OK to close the application. "

This is how I got there:

  • Found that the header files were stored in "C:\Users<me>\AppData\Local\VirtualStore\Program Files (x86)\Dev-Cpp\include" and added that path to the "Include Directory" in my project settings.

  • Made sure that my target was 32bit.

  • Also tried to add the library files directly in the "Parameters / Linker" settings. But have no clue whether to include the.a, .dll, .lib, .def, or.dll.a file. None of this seemed to work. The linker couldn't fine the functions.

  • Finally, replaced the above with string "-lpng -lz" to the "Parameters / Linker" settings. And finally the project both compiled and linked.

But when I try to run the program I get the "The application was unable to start correctly"-message. Does anyone have a clue what's wrong?

The old bloodshed Dev-C++ IDE was updated by Embarcadero. The new download page can be found here: https://sourceforge.net/projects/embarcadero-devcpp/ . You can try that out if you are running into problems while using your current version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM