[Scons-users] use C++ compiler for building

Philipp Kraus philipp.kraus at flashpixx.de
Fri Dec 28 14:27:43 EST 2012



Am 28.12.2012 um 19:40 schrieb Dirk Baechle:


> Hi Phil,

>

> Am 28.12.2012 19:29, schrieb Philipp Kraus:

>> Am 28.12.2012 um 18:54 schrieb William Deegan:

>>

>>> On Dec 28, 2012, at 7:15 AM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:

>>>

>>>> Hello,

>>>>

>>>> I build C codes to a shared library with scons, the library codes are stored in *.c files and Scons uses the gcc for compiling the library. The library is written in plain C and can be build also with a C++ compiler for setting some different calls. How can I tell Scons on the env.SharedLibrary command, that the C++ compiler should be used.

>>> To clarify, you're asking how do you get .c files compiled via g++ instead of gcc?

>> Yes :-) I would like to compile *.c files with g++

>

> isn't this what the gcc option "-x" is there for?


It should be work with Visual Studio, so swapping the CXX and CC is more efficent

Phil


More information about the Scons-users mailing list