Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com To: "cygwin AT sourceware DOT cygnus DOT com" Date: Wed, 19 Jan 2000 06:13:57 -0800 From: " Clark Sims " Message-ID: Mime-Version: 1.0 X-Sent-Mail: on X-Mailer: MailCity Service Subject: Problem with separate compiling and linking X-Sender-Ip: 209.246.58.190 Attachments: foo.cpp, foo.err, foo.mak Organization: My Deja Email (http://www.my-deja.com:80) Content-Type: multipart/mixed; boundary="=_-=_-KLFFMEAKMGAAFBAA" Content-Transfer-Encoding: 7bit --=_-=_-KLFFMEAKMGAAFBAA Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Length: 529 Content-Transfer-Encoding: 7bit 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. --=_-=_-KLFFMEAKMGAAFBAA Content-Type: text/plain; charset=us-ascii; name="foo.cpp" Content-Language: en Content-Length: 220 Content-Transfer-Encoding: 7bit #include #include int main( void) { std::vector foovect; int i; for (i=0;i<10;i++) { foovect.push_back( i); std::cout << foovect[i] << std::endl; } return 0; } --=_-=_-KLFFMEAKMGAAFBAA Content-Type: text/plain; charset=us-ascii; name="foo.err" Content-Language: en Content-Length: 0 Content-Transfer-Encoding: 7bit --=_-=_-KLFFMEAKMGAAFBAA Content-Type: text/plain; charset=us-ascii; name="foo.mak" Content-Language: en Content-Length: 123 Content-Transfer-Encoding: 7bit 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 --=_-=_-KLFFMEAKMGAAFBAA Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com --=_-=_-KLFFMEAKMGAAFBAA--