CodeLiteDir using \ and confusing gcc

CodeLite installation/troubleshooting forum
ascholer
CodeLite Curious
Posts: 2
Joined: Tue May 14, 2013 5:55 am
Genuine User: Yes
IDE Question: C++
Contact:

CodeLiteDir using \ and confusing gcc

Post by ascholer »

I've noticed CodeLite setes the CodeLiteDir variable using a backslash and that seems to confuse gcc when it is used to build up longer paths.
This is my Env Vars:

Code: Select all

CodeLiteDir=C:\CodeLite
WXWIN=$(CodeLiteDir)/wxWidgets-2.9.4
PATH=$(WXWIN)/lib/gcc_dll;$(CodeLiteDir);$(CodeLiteDir)/MinGW-4.4.1/bin;$(CodeLiteDir)/wxWidgets-2.9.4/lib/gcc_dll;$(PATH)
WXCFG=gcc_dll/mswu
UNIT_TEST_PP_SRC_DIR=$(CodeLiteDir)\UnitTest++-1.3
If I try to say build a UnitTest++ project, it produces this:
g++ -c "C:/Users/Andrew/Desktop/clut/main.cpp" -g -o Debug/main.o -I. -IC:\CodeLite\UnitTest++-1.3/src -I.
And g++ complains about a missing header.

If I force add:
-Ic:/CodeLite/UnitTest++-1.3/src
Everything builds OK (well linker dies because of the same issue...)

How do I get the built in vars to handle slashes appropriately?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLiteDir using \ and confusing gcc

Post by eranif »

You don't provide your codelite version, nor the build output as requested here:
HOW TO POST

In addition, why don't you change the value of CodeLiteDir environment variable to include slashes instead of backslashes?


Eran
Make sure you have read the HOW TO POST thread
ascholer
CodeLite Curious
Posts: 2
Joined: Tue May 14, 2013 5:55 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLiteDir using \ and confusing gcc

Post by ascholer »

Sorry...
Version 5.1 (Downloaded the CodeLite/MinGW/wxWidgets bundle.

Using the basic UnitTest project, get this build output:

Code: Select all

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f  "cltestwx_wsp.mk""
----------Building project:[ clut - Debug ]----------
mingw32-make[1]: Entering directory `c:/Users/Andrew/Desktop/clut'
codelitegcc g++  -c  "C:/Users/Andrew/Desktop/clut/main.cpp" -g  -o Debug/main.o -I. -IC:\CodeLite\UnitTest++-1.3/src -I.
C:/Users/Andrew/Desktop/clut/main.cpp:1:24: fatal error: UnitTest++.h: No such file or directory
compilation terminated.
mingw32-make[1]: *** [Debug/main.o] Error 1
mingw32-make.exe: *** [All] Error 2
clut.mk:96: recipe for target `Debug/main.o' failed
mingw32-make[1]: Leaving directory `c:/Users/Andrew/Desktop/clut'
cltestwx_wsp.mk:4: recipe for target `All' failed
1 errors, 0 warnings
If I change my slashes to this:

Code: Select all

CodeLiteDir=C:/CodeLite
MYDIR=C:/CodeLite
UNIT_TEST_PP_SRC_DIR=$(CodeLiteDir)/UnitTest++-1.3
Everything works great, but CodeLite helpfully changes the slashes back each time it starts up. I could hardcode it in as some other variable, but I like the autoset... trying to use it portably, I think I can live without the settings that get placed in AppData/Roaming, but would be nice if I could get the path it autofills to use slashes that gcc likes.
Post Reply