delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/02/09:42:06

From: geier AT forwiss DOT uni-passau DOT de (Roland Geier)
Subject: Undefined reference to 'WinMain AT 16'???
2 Jul 1997 09:42:06 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199707021502.RAA03846.cygnus.gnu-win32@bombadill.forwiss.uni-passau.de>
Mime-Version: 1.0
Original-To: gnu-win32 AT cygnus DOT com
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: owner-gnu-win32 AT cygnus DOT com

Hi!

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

I'm linking with the command:

: g++ -v -Wl,--dll,--base-file=DateTime.base \
:       -e _DllEntryPoint AT 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 AT 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 AT 16'

Any hints???

Thx in advance,

--- Roland.

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





-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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