Problem with linking step

Alessandro Vicini alessandro.vicini@sitael.com
Fri Sep 1 14:29:00 GMT 2017



Hullo everybody,

I am using gfortran-6 under Suse sles11. The linking step for my program looks like the following:

gcc-6 -static-libgcc -o myprogram.exe myprogram.o  $(GRAPHIC_LIBS) -Wl,-Bstatic -lgfortran -lquadmath -lgomp -Wl,-Bdynamic  -lm

This works fine.
However, when I move under a Suse Sles12 system, I get the following error:

/usr/x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/7/libgomp.a(target.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Any hint about what could be the problem? Thank you.

Alessandro



More information about the Gcc-help mailing list