Compiler directives
-
Hi, I have 2 projects ( project A and B)which use most of the same functions, but there are others which are unique to project A and others to B. I would like to be able to use a #define to compile Project A with its own functions and then by changing the #define compile project B with its functions. In other words, I would like to avoid defining 2 different projects. Is this possible? And how does one do it, both in the header and source code files? Thanking you in anticipation. Rui
-
Hi, I have 2 projects ( project A and B)which use most of the same functions, but there are others which are unique to project A and others to B. I would like to be able to use a #define to compile Project A with its own functions and then by changing the #define compile project B with its functions. In other words, I would like to avoid defining 2 different projects. Is this possible? And how does one do it, both in the header and source code files? Thanking you in anticipation. Rui
You can use #ifdef and friends for conditional compilation. Your other option is to create a library containing common code. Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group