From: Nick AT fys DOT ruu DOT nl (Nick van Eijndhoven) Subject: g++ option -nostartfiles doesn't work. 21 Feb 1997 09:39:10 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199702211613.RAA08607.cygnus.gnu-win32@ruunf0.fys.ruu.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: gnu-win32 AT cygnus DOT com Original-Cc: Nick AT fys DOT ruu DOT nl (Nick van Eijndhoven) X-Mailer: ELM [version 2.4 PL25] Original-Sender: owner-gnu-win32 AT cygnus DOT com Dear GNU developers, I want to use g++ to perform the ld step of my *.o files to create a DLL. The original source files were C++ programs. Obviously in this effort I want to prevent the linking in of crt0.o and as such I specify g++ -nostartfiles -o q.dll *.o However, it seems that crt0.o is still linked in since I get an unresolved reference to main() from libmain.a. Do I understand something wrong here, or is the option -nostartfiles not working ? I also tried ld -o q.dll *.o -L'the proper directory' -lg++ but in this case the standard I/O facilities 'cout' and co. were not found. Please help me out, since this is rather urgent. Thanks in advance, Nick. *----------------------------------------------------------------------* Dr. Nick van Eijndhoven Department of Subatomic Physics email : nick AT fys DOT ruu DOT nl Utrecht University / NIKHEF tel. +31-30-2532331 (direct) P.O. Box 80.000 tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht fax. +31-30-2518689 The Netherlands WWW : http://www.fys.ruu.nl/~nick Office : Ornstein lab. 172 *----------------------------------------------------------------------* - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".