[Met_help] problem with MET compilation

John Halley Gotway johnhg at ucar.edu
Mon Mar 1 10:42:04 MST 2010


Hachelaf,

In the compilation of MET, we're using static linking as opposed to dynamic linking.  So we're not using the shared object files ending in .so, like "libstdc++.so".  Instead, we're linking against the
library archive files that end in .a, like "libstdc++.a".  If your GNU compilers are installed properly, they should already know how to find those standard library files.  So I suspect that there may
be problems in how your compilers are installed.  If possible, I'd suggest describing the problem to your systems administrator for help in resolving the issue.

You could also try to locate the library archive file you should be using and add it's location to the MET Makefile.  To test this out, I set the following line in my MET Makefile:
CXX_LIBS = -Xlinker -M

This tells the linker to dump out a map describing how all the linking was performed.  In the output, I saw that my GNU g++ compiler was linking to this library archive file:
/usr/lib/gcc/i486-linux-gnu/4.3.2/libstdc++.a

You could try the following command (assuming your compilers are installed is /usr somewhere):
find /usr/lib -name libstdc++.a

That will look for the file "libstdc++.a" starting in the directory /usr/lib.  Once you locate that file "libstdc++.a", you could try to tell your Makefile which directory contains that file by
setting the following:
CXX_LIBS = -L/path/to/library/directory

And then try recompiling MET.  However, I'm not very confident that this will solve your problem.  If there are problems in how your GNU compilers are installed, it's likely that this won't be the
only problem you encounter.

Hope that helps.

John Halley Gotway
met_help at ucar.edu

hachelaf rabah wrote:
> Hello,
> i try to compil Met tool with g++,with the makefile file attached,
> 
> but i have an error message  like that :
> /usr/bin/ld: cannot find -lstdc++
> collect2: ld returned 1 exit status
> make[3]: *** [pcp_combine] Erreur 1
> when the compilation reaches "pcp_combine application".
> i check my ld libraries and all it seems ok ;
> when i type [root at localhost etc]# ldconfig -p
> i can find the stdc++ library like :
> libstdc++.so (libc6) => /usr/lib/libstdc++.so
> you can find in attchached file the log file from compilation.
> And can you tell me if there is others CXX_LIBS  to add in the makefile
> 
> Thank you.
> 


More information about the Met_help mailing list