Subject: g++ option -nostartfiles doesn't work.
From: [email-masked] (Nick van Eijndhoven)

21 Feb 1997 09:39:10 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked]
Original-Cc: [email-masked] (Nick van Eijndhoven)
X-Mailer: ELM [version 2.4 PL25]
Original-Sender: [email-masked]

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 : [email-masked]                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
"[email-masked]" with one line of text: "help".