Re: Problem with linking step

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 September 2017 at 15:29, Alessandro Vicini wrote:
>
>
> 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.

This isn't really a GCC question, but the problem is that dlclose is
defined in libdl and you didn't add -ldl to the command-line.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux