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]

g++ option -nostartfiles doesn't work.


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@fys.ruu.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@cygnus.com" with one line of text: "help".


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