* linking with ar help
@ 2003-10-28 20:38 y2bismil
0 siblings, 0 replies; only message in thread
From: y2bismil @ 2003-10-28 20:38 UTC (permalink / raw)
To: GCC- help
Hi all,
I'm having a bit of problem linking here. I've archived several object files
and push those into the linker. Then I get some, not a long though, of
undefined refereces errors. These are straight c++ link errors. No extern "C"
or asm or anything. The 'complaining' file is c++, and the file where the
definition is, is also c++.
Now, this had my puzzled for a while, until I explicity linked to the originial
(unarchived) object files. Doing this resolved the first few errors. I'm
thinking I must be doing something wrong with the archiving.
the cygwin command I'm using.
ar.exe rP $(.TARGET) <@<
$(.SOURCES,W\n)
I have tried other option combinations "cr" ...but to no avail.
To link, I do:
*****************************
gcc -mno-cygwin
-lwsock32
-g
-o$(_Target)
$(LinkFiles)
myobject.o
*****************************
I've verified the contents of LinkFiles, which seems right. Notice the
insertion of myobject.o...this is my hack to get past the first few errors. I
don't want to add all the objects files here. I wanted to use archives for a
reason. BTW...there are duplicate object file names, but they are in different
directories. When I archive each directory, I copy each arhive to a central
link directory, where everything is linked.
Any ideas?
Thanks,
Yamin
----------------------------------------
This mail sent through www.mywaterloo.ca
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-28 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 20:38 linking with ar help y2bismil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).