Codelite6: Question about Build settings/Compilers

General questions regarding the usage of CodeLite
Morkel
CodeLite Enthusiast
Posts: 10
Joined: Mon Mar 22, 2010 1:59 pm
Genuine User: Yes
IDE Question: C++
Contact:

Codelite6: Question about Build settings/Compilers

Post by Morkel »

Any chance to get the "PATH environment variable" setting back which has been removed from "Build settings/Compilers"?
This made it super-easy to switch between different MinGW versions.

Best regards,
Morkel
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite6: Question about Build settings/Compilers

Post by eranif »

Morkel wrote:This made it super-easy to switch between different MinGW versions
This feature was the root cause of countless reports on this forum (usually it was sh.exe in path that caused broken builds)

You can switch between compilers by simply redefining the environment variables:
CXX, CC, AR and AS (these will always take precedence over the defined tools)

Eran
Make sure you have read the HOW TO POST thread
alexrass88
CodeLite Curious
Posts: 4
Joined: Wed Apr 23, 2014 8:14 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Codelite6: Question about Build settings/Compilers

Post by alexrass88 »

Can be codelite will add the path to the compiler to environment variables?
Then switch compiler, codelite change path.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite6: Question about Build settings/Compilers

Post by eranif »

I did a lot of research on this matter before decided that the tools for a compiler will be used with thier full path (this is how other Makefile generators behaves, such as CMake)
Messing up with an environment is a bad idea and often yields an unwanted results

Eran
Make sure you have read the HOW TO POST thread
alexrass88
CodeLite Curious
Posts: 4
Joined: Wed Apr 23, 2014 8:14 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Codelite6: Question about Build settings/Compilers

Post by alexrass88 »

I have 2 mingw installs. mingw-4.8.1-tdm and mingw-w64 4.8.2. If i not set env var, compiler not working...
C:\Windows\system32\cmd.exe /c "D:/mingw32/bin/mingw32-make.exe -j4 -e -f Makefile"
mingw32-make[1]: warning: -jN forced in submake: disabling jobserver mode.
"----------Building project:[ cltest - Debug ]----------"
mingw32-make[1]: Entering directory 'P:/PrjMGW/cltest'
mingw32-make[1]: *** [Debug/main.cpp.o.d] Error 1
mingw32-make.exe: *** [All] Error 2
cltest.mk:96: recipe for target 'Debug/main.cpp.o.d' failed
mingw32-make[1]: Leaving directory 'P:/PrjMGW/cltest'
Makefile:4: recipe for target 'All' failed
1 errors, 0 warnings
After adding compiler path to env var it working normal...
Post Reply