delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/01/19/09:10:56

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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" <cygwin AT sourceware DOT cygnus DOT com>
Date: Wed, 19 Jan 2000 06:13:57 -0800
From: " Clark Sims " <clarksimsgnu AT my-Deja DOT com>
Message-ID: <PEJIPEAKMGAAFBAA@my-deja.com>
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)

--=_-=_-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 <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;
}
--=_-=_-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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019