Unable to link to library version of my choice
Marco Ricci
marcoricci2012@yahoo.com
Thu Mar 1 20:22:00 GMT 2012
Thanks to both you and Jonathan Wakely for responding.
> I guess you checked that with ldd on your program, not
> strace on the build?
Correct, but I also had some printf statements and so it was clear at run time as well.
> There are 2 operations called linking. One is when you
> create the binary file. Another one is when you run it. -L
> tells where to look for libraries during the first one.
> -rpath (it is a linker option, so you want -Wl, in front)
> tells where to look during the second one.
So I should use both -L option and -Wl option while compiling?
~~marco
More information about the Gcc-help
mailing list