Issue with GMAKE
Hi,
I just have a query,In my project im using GCC Compiler for compilation which uses Solaris DMAKE. Now im migrating this to GMAKE. But Normally GMAKE by default picks g++ Compiler for compilation. Im getting lot of errors since my code based out of GCC Anybody help me out how to resolve this issue, So that my makefile based out of GMAKE should pick GCC Compiler for compilation. Thanks in advance!! |
Make sure your source files are named correctly.
The default gnu make rules compile *.c with gcc, *.cc, *.C and *.cpp with g++. The compiler changes if you change the value of predefined variables CC and CXX, so don't do that. |
Hello Pond im not changing the predefined variables. My intention is i want to change the default compiler that gmake uses that is g++ to gcc compiler.
|
Quote:
C and C++ are different programming languages which use different compilers. As smallpond already stated, gmake (and dmake or make for that matter) pick the correct compiler depending on the source code extension. |
anyway, if you want to change the compiler you must modify those predefined variables, not the make utility itself. Using g++ instead of gcc is not a good idea, because gcc is a c compiler, g++ is a c++ compiler (as it was mentioned). replacing the make system will not solve this issue and also you may get additional problems because of the differences (incompatibilities) between them
|
All times are GMT -5. The time now is 01:23 AM. |