Subject: Undefined reference to 'WinMain@16'???
From: [email-masked] (Roland Geier)

2 Jul 1997 09:42:06 -0700
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]
X-Face: 
	 %JjDwL,CM#gbv*uICrNLdM9yk_LRxMh3DV'.fQ>iw'N;7([Jq}2|J#5o".kzM&>7tW`8T^Z
	 buvRLp?jvQ+sbD3BND%=&D: lT%vT4p7cGcGRP5JO+F'^
X-Mailer: ELM [version 2.4ME+ PL31 (25)]
Original-Sender: [email-masked]

Hi!

When trying to build a dll consisting of serveral c++-object-files I
always get an undefined reference to 'WinMain@16'. 

I'm linking with the command:

: g++ -v -Wl,--dll,--base-file=DateTime.base \
:       -e _DllEntryPoint@12 \
:       -o DateTime.dll \
:       *.o -ltcl7.6

The fixup-Code (file 'fixup.cc') contains the single line 

:	 asm (".section .idata$3\n" ".long 0,0,0,0,0,0,0,0");

The result of the linkage is:

: Reading specs from
: C:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cyg
: nus-2.7.2-970404\specs gcc version cygnus-2.7.2-970404
: C:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\.
: ./../../../i386-cygwin32\bin\ld.exe -o DateTime.dll -e
: _DllEntryPoint@12 C:\Programme\gnuw
: in32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\../../../../i386-cy
: gwin32\lib\crt0.o
: -LC:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cy
: gnus-2.7.2-970404
: -LC:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib
: -LC:\Programme\g
: nuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\../../../../i386
: -cygwin32\lib
: -LC:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus
: -2.7.2-970404\../../.. --dll --base-file=DateTime.base Date.o
: DateTimePkgInit.o Month.o Time.o TinyTime.o WeekDay.o Year.o fixup.o
: -ltcl7.6 -lstdc++ -lm -lgcc -lcygwin -lkernel32 - lgcc
: C:\Programme\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\..
: /../../../i386-cygwin32\lib/libcygwin.a(libcmain.o)(.text+0x37):libcmain.cc:
: undefined reference to `WinMain@16'

Any hints???

Thx in advance,

--- Roland.

---
Roland Geier                    Phone: ++49 (8505) 92182         
Universitaet Passau, GER 	Fax:   ++49 (8505) 922311
Lehrstuhl Prof. Dr. Donner      [email-masked]	
D-94032 Passau                  http://www.uni-passau.de/~geier/

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".