Open GoogleCodeExporter opened 9 years ago
This is a good find. The reason for this behavior is probably that the plug-in
is unable to find the standard c++ library (thus undefined references). The
current way of obtaining the c++ libraries is far from optimal. However your
suggestion seems to work for you and therefore might work universally for other
operating systems as well.
May I ask how did you manage to change '/usr/bin/gcc' to '/usr/bin/g++'?
Original comment by petri.tuononen@gmail.com
on 8 Sep 2011 at 6:05
Simple, i didn't manage to ;) !
I just copy and paste this line into my terminal, replacing gcc by g++, to
follow an advice on compiling c++ with g++ not gcc.
(sorry if this explanation is not clear, english is not my natural
language).
Original comment by stephane...@gmail.com
on 9 Sep 2011 at 7:18
Ok, thanks for clarification :)
I try to figure out why it tries to use gcc with C++ projects instead of g++.
Original comment by petri.tuononen@gmail.com
on 9 Sep 2011 at 2:24
System compiler /usr/bin/gcc is automatically called after LLVM's Linker
(llvm-ld) therefore I did not find a way to modify it in plug-in.
The only solution I can give is to define -l and -L flags to LLVM's linker.
1) Open up a terminal on Linux and execute command: locate libstdc++.a
2) Copy and paste the path without file name inside Eclipse into Window ->
Preferences -> LLVM -> Library search path directories
3) Check that libraries have stdc++ if not add it.
Hope this helps.
Original comment by petri.tuononen@gmail.com
on 10 Sep 2011 at 2:31
Thanks, i will try this workaround soon.
To make it clear, is it a problem in llvm-ld, in eclipse or into the plugin
infrastructure ?
Original comment by stephane...@gmail.com
on 11 Sep 2011 at 7:39
Well I am not totally sure yet. It seems like llvm-ld defaults to /usr/bin/gcc
as a post compilation procedure so that I believe there is not much I can do
plug-in wise.
Original comment by petri.tuononen@gmail.com
on 11 Sep 2011 at 8:40
Thanks...this really helped. I could not see the mistake. Well done!!
Original comment by tariqsu...@gmail.com
on 22 Mar 2014 at 10:05
Original issue reported on code.google.com by
stephane...@gmail.com
on 1 Aug 2011 at 10:15