开发者

Linking to a library that links to a library

开发者 https://www.devze.com 2023-03-08 05:16 出处:网络
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 a

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

0

精彩评论

暂无评论...
验证码 换一张
取 消