Using clang in windows

General questions regarding the usage of CodeLite
cubancigar11
CodeLite Enthusiast
Posts: 11
Joined: Tue Mar 04, 2014 3:03 am
Genuine User: Yes
IDE Question: C++
Contact:

Using clang in windows

Post by cubancigar11 »

Hi!

I am using Codelite 5.4 with pre-packaged MinGW on Windows 7.

I just installed LLVM-3.4 and selected the option to update PATH. I confirm that clang++.exe is part of the PATH now. After that I updated my project to use clang++ toolchain and cleaned it (and manually deleted Debug directory). But when I compile my project, I get following error while linking:
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
"----------Building project:[ Graph - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Users/cubancigar11/codelite/Graph'
codelitegcc clang++ -c "C:/Users/cubancigar11/codelite/Graph/main.cpp" -g -O0 -Wall -o ./Debug/main.o -IC:/MinGW-4.8.1/include -IC:/MinGW-4.8.1/lib/gcc/mingw32/4.8.1/include -IC:/MinGW-4.8.1/lib/gcc/mingw32/4.8.1/include-fixed -IC:/MinGW-4.8.1/lib/gcc/mingw32/4.8.1/include/c++ -IC:/MinGW-4.8.1/lib/gcc/mingw32/4.8.1/include/c++/backward -IC:/MinGW-4.8.1/lib/gcc/mingw32/4.8.1/include/c++/mingw32 -IC:/boost_1_55_0 -I. -I.
clang++ -o ./Debug/Graph @"Graph.txt" -L.
./Debug/main.o: In function `main':
C:/Users/cubancigar11/codelite/Graph/main.cpp:206: undefined reference to `_Unwind_Resume'
./Debug/main.o: In function `AdjacencyList':
C:\Users\cubancigar11\codelite\Graph/./adjacency_list.h:65: undefined reference to `_Unwind_Resume'
./Debug/main.o: In function `ZNK5Graph13AdjacencyListIiE10NeighboursERKi':
C:\Users\cubancigar11\codelite\Graph/./adjacency_list.h:120: undefined reference to `_Unwind_Resume'
./Debug/main.o: In function `ZNK5Graph13AdjacencyListIiE7ParentsERKi':
C:\Users\cubancigar11\codelite\Graph/./adjacency_list.h:134: undefined reference to `_Unwind_Resume'
./Debug/main.o: In function `Z13list_verticesIiEvRKN5Graph13AdjacencyListIT_EERKS2_b':
C:/Users/cubancigar11/codelite/Graph/main.cpp:33: undefined reference to `_Unwind_Resume'
./Debug/main.o:C:\Users\cubancigar11\codelite\Graph/./adjacency_list.h:360: more undefined references to `_Unwind_Resume' follow
./Debug/main.o:fake:(.eh_frame+0x63): undefined reference to `__gxx_personality_v0'
./Debug/main.o:fake:(.eh_frame$_ZN5Graph13AdjacencyListIiEC2ERSsjb+0x13): undefined reference to `__gxx_personality_v0'
./Debug/main.o:fake:(.eh_frame$_ZNK5Graph13AdjacencyListIiE10NeighboursERKi+0x13): undefined reference to `__gxx_personality_v0'
./Debug/main.o:fake:(.eh_frame$_ZNK5Graph13AdjacencyListIiE7ParentsERKi+0x13): undefined reference to `__gxx_personality_v0'
./Debug/main.o:fake:(.eh_frame$_Z13list_verticesIiEvRKN5Graph13AdjacencyListIT_EERKS2_b+0x13): undefined reference to `__gxx_personality_v0'
./Debug/main.o:fake:(.eh_frame$_ZNK5Graph13AdjacencyListIiE20ShortestPathDijkstraERKiS3_+0x13): more undefined references to `__gxx_personality_v0' follow
collect2.exe: error: ld returned 1 exit status
clang++.exe: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
mingw32-make.exe[1]: *** [Debug/Graph] Error 1
mingw32-make.exe: *** [All] Error 2
Graph.mk:79: recipe for target 'Debug/Graph' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/cubancigar11/codelite/Graph'
Makefile:4: recipe for target 'All' failed
11 errors, 0 warnings
What step am I missing?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using clang in windows

Post by eranif »

Not really related to codelite.
IIRC, clang has problem with exception handling on Windows

See my comment on the Code::Blocks forum:

http://forums.codeblocks.org/index.php/ ... #msg122287

Eran
Make sure you have read the HOW TO POST thread
cubancigar11
CodeLite Enthusiast
Posts: 11
Joined: Tue Mar 04, 2014 3:03 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using clang in windows

Post by cubancigar11 »

Thanks. I saw that mail while searching on the web but didn't notice it was you :)

So, then, I am stuck with slow compile times for now.
Post Reply