Simple linking problem
gccNewbie
bguild@shaw.ca
Thu May 10 18:18:00 GMT 2007
Matthew Woehlke-3 wrote:
>
> Linux lets you get away with this wrong link order due to lazy symbol
> resolution, whereas Windows does not. What you have done is asked to
> first link to libmylib. Since no objects (actually, you don't *have* any
> objects yet!) require any symbols from libmylib, no symbols are
> imported.
>
That solved my problem very well! I should have tried that, but it's even
better to have this explanation of why it works.
It's odd that the manual was so deliberately misleading on this! While I was
trying to solve this myself, I read: "You can mix options and other
arguments. For the most part, the order you use doesn't matter. Order does
matter when you use several options of the same kind; for example, if you
specify -L more than once, the directories are searched in the order
specified."
--
View this message in context: http://www.nabble.com/Simple-linking-problem-tf3720892.html#a10418803
Sent from the gcc - Help mailing list archive at Nabble.com.
More information about the Gcc-help
mailing list