SlickEdit Product Discussion > SlickEdit®
C and C++ files in the project
(1/1)
Bwana The Bigg:
Hello!
I have a project, some of the source files are in C, some in C++. For compilation, I set "CC" in the "Build:GNU C Options:Compiler" field and C files are compiled with gcc, and C++ files with g++. However, C files should be compiled with one set of options, and C++ files with others. Can I somehow set separate options for C and C++ files?
Clark:
You'll need to add a Rule for .c files which has different options. I manually added the rule to the .vpj file. I don't think this can be done through the GUI. Attached is a sample GNU C/C++ project where I've added a rule for .c files so I can use a different compiler (gcc instead of g++). You can change the options specified too. See gnucpp1.vpj.
Navigation
[0] Message Index
Go to full version