I'm trying to link cpgui
to my library, which links to SFML
. I use code::blocks
so I had to make my own project for that library, and as it requires SFML
I statically linked to SFML
in that library and compiled it开发者_运维百科 fine.
Now, when I attempt to statically link that library to my library, I get a bunch of undefined references to SFML
when I compile my project. Even if I linked to SFML
in both projects, what's happening?
As you guessed, you can make it simpler by adding the library files directly to the project.
Another solution as suggested by AJG85 would have been to link the library -- after taking care of conflicting dependencies.
Use relevant documentation as suggested by answer to How do I link a library to my project in CodeBlocks & GCC without adding the library source to my project
精彩评论