[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [cdt-dev] Finding stdc++ library path automatically | 
Even on windows it is tricky.
a) There might be no cygwin or mingw
b) There might be both
c) MinGW might not be in C:\MinGW but somewhere else
d) There might be a different solution like the distribution from 
equation.com
e) There might not be a path entry in environment variables (e.g. 
multiple installations, and/or gcc might be added to PATH by script or hand)
f) There might be llvm-gcc with the libs
g) There might be a clang build which includes mingw headers as llvm-gcc 
(asked about such distribution pn #llvm)
Am 04.05.2011 10:56, schrieb Petri Tuononen:
Hello!
Could someone provide any clues how to find stdc++ library path (not 
dependent on OS) programmatically using Eclipse CDT API.  I try to add 
it to projects's includes.
I am developing LLVM plug-in for CDT and many people have asked the 
feature to automatically find stdc++ library path. Currently the 
clang++ toolchain is able to find same includes than e.g. Linux GCC 
toolchain from org.eclipse.cdt.managedbuilder.gnu.ui plug-in. I have 
defined default value -lstdc++ to C++ linker. In Windows I can 
probably get stdc++ path from Cygwin/MinGW environment variable 
suppliers after getting their installation path and appending 
applicable subdir. However in Linux getting stdc++ lib path seems to 
be trickier. In Ubuntu (depending on gcc version) 
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/<version> but there's 
quite many distributions with different filesystem hierarchies. It 
came to my mind that using a script 'locate stdc++' could be 
(unpractical) option but how to call such a script from Eclipse? Any 
suggestions for practical solutions?
BR
Petri
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev