This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with separate compiling and linking


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]