[cfe-users] Trouble building clang trunk from source

Larry Evans cppljevans at suddenlink.net
Tue Jul 2 07:52:23 PDT 2013

On 06/18/13 16:16, Nathan Ridge wrote:
> The 3.3 release works fine, by the way. Will use that for now.
> Thanks,
> Nate 		 	   		  
Hi Nate,

I was also able to build using those same instructions:


However, when using the newly built clang to compile,
it worked OK; however, the link did not:

make -f simple.mk test
-c test.cpp
test.o -o test.exe
test.o: In function `main':
test.cpp:(.text+0xc): undefined reference to `std::cout'
test.cpp:(.text+0x20): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
test.o: In function `__cxx_global_var_init':
test.cpp:(.text.startup+0x11): undefined reference to
test.cpp:(.text.startup+0x19): undefined reference to
clang: error: linker command failed with exit code 1 (use -v to see
make: *** [test] Error 1

Compilation exited abnormally with code 2 at Tue Jul  2 07:46:49

Anyone have any ideas whats missing.  Should I also run install as
indicated here:





More information about the cfe-users mailing list