Friday, April 20, 2012

How to override compiler options for referenced c++ project in visual studio

I am using visual stuido 2010.



I have a static library call "common library". This common library is referenced by many other projects. These projects use the common library by "add new reference" (in project properties -> common properties -> add new reference).



All these projects have their special compiler options/predefined macros. Common library needs to conform their settings, or the compilation fails. Is there any simple way to achieve this?



The current solution is: copy a new "common library" project file for each project, and set the options/macros in the new project file. It is very painful.





No comments:

Post a Comment