开发者

library examples build in eclipse

开发者 https://www.devze.com 2023-03-20 12:22 出处:网络
I have C project of a library (using CDT). Configurations for both static and dynamic linking for several platforms. Several examples of the library usage is also included in the project. What is the

I have C project of a library (using CDT). Configurations for both static and dynamic linking for several platforms. Several examples of the library usage is also included in the project. What is the best way to build these examples with the library? If I would like to build both the library and examples (linking the library just built) in one configuration?

I suppose I have to use custom makefile. Do I have to create makefile for the whole project (several of them, one for eac开发者_StackOverflow社区h platform), or is there any way how to include examples makefile to the automatic one?

Each example has only one source file, so the only things I need to do in my makefile are to determine which compiler is used, add some flags and link with the library which was built (I would include the make examples command as the post-build step).


As I didn't find any solution for this, I use custom makefile for the whole build. I also found a nice advice somewhere: if you want advanced build functions, use advanced build system.

0

精彩评论

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