Re: Problem with linking step

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

 



On 1 September 2017 at 15:55, Alessandro Vicini wrote:
> Thank you Jonathan, but if I add -ldl to the command line I get:
>
> /usr/x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/6/libgomp.a(proc.o): undefined reference to symbol 'pthread_getaffinity_np@@GLIBC_2.3.4'
> /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status

Same problem, you didn't link to the required library for
pthread_getaffinity_np. Look at the man page for
pthread_getaffinity_np and it tells you to compile and link with
-pthread.

Just like the man page for dlclose tells you to link with -ldl.



>
>
> -----Messaggio originale-----
> Da: Jonathan Wakely [mailto:jwakely.gcc@xxxxxxxxx]
> Inviato: venerdì 1 settembre 2017 16:50
> A: Alessandro Vicini
> Cc: gcc-help@xxxxxxxxxxx
> Oggetto: Re: Problem with linking step
>
>
> 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