This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Problem with separate compiling and linking
- To: "cygwin at sourceware dot cygnus dot com" <cygwin at sourceware dot cygnus dot com>
- Subject: Problem with separate compiling and linking
- From: " Clark Sims " <clarksimsgnu at my-Deja dot com>
- Date: Wed, 19 Jan 2000 06:13:57 -0800
- Attachments: foo.cpp, foo.err, foo.mak
- Organization: My Deja Email (http://www.my-deja.com:80)
OS: NT 4.0 SP5
Compiler: GCC 2.95, 19990728 release
Cygnus: 21.0 (0.8/1/1)
I wrote the simple program foo.cpp, with the makefile foo.mak. Under Cygnus/NT g++ -o foo foo.cpp, works fine. Under linux, make -f foo.mak, works fine. Under Cygnus/NT make -f foo.mak, produces the linker errors, listed in foo.err.
What am I doing wrong here? How do I make the linker "see", the missing references?
Thanks in Advance,
Clark Sims
--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.
#include <vector>
#include <iostream>
int main( void) {
std::vector<int> foovect;
int i;
for (i=0;i<10;i++) {
foovect.push_back( i);
std::cout << foovect[i] << std::endl;
}
return 0;
}
OBJ= foo.o
LIB=
foo : $(OBJ) fsf.gcc1/foo.mak
g++ -o foo $(OBJ) $(LIB)
foo.o : foo.cpp
g++ -g -p -c -o foo.o foo.cpp
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com