Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: StormByte on October 05, 2010, 05:00:36 am

Title: Project to build BOTH shared and static library
Post by: StormByte on October 05, 2010, 05:00:36 am
Hi there, I have several C::B projects which are shared libraries, but I wanted to know if there are some way to have only one project which could build up the two versions: shared and static libraries in same project.
I know it may force C::B to recompile because of -shared option which it passes to gcc to make static one, but it could be usefull sometimes.

Is there any way to do this, or do I have to have 2 different projects for any library?

Thanks
Title: Re: Project to build BOTH shared and static library
Post by: Jenna on October 05, 2010, 07:17:53 am
It should work, if you create two targets, one for shared and one for static and a virtual target that includes both of them.

You can copy, modify and create virtual targets in "Project -> Properties".
Title: Re: Project to build BOTH shared and static library
Post by: StormByte on October 05, 2010, 02:51:20 pm
THank you! I've never looked at virtual targets, it worked :)