delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/06/12:40:33

From: jens DOT yllman AT uniweb DOT se (Jens Yllman)
Subject: B20: Using -mwindows results in link warning.
6 Nov 1998 12:40:33 -0800 :
Message-ID: <36419CA5.4FB98A42.cygnus.gnu-win32@uniweb.se>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

 Hello,

 When I try to compile and link a Windows program using gcc that is in
B20 I get the following warning when I link:

warning: cannot find entry symbol _WinMainCRTStartup; defaulting to
00401000

 The exe file is created and I can run the program. But how sure can I
be that the program works OK. Anyone who knows how to fix this?

 The mainfile containg the WinMain() looks like this:

#include <windows.h>

int STDCALL WinMain( HINSTANCE tCurrInstance,HINSTANCE
tPrevInstance,LPSTR cpCmdLn,int iSM )
{
  ...
}

 My makefile looks like this:

CXXFLAGS=-O3
CPPFLAGS=-I.

LDFLAGS=-s -mwindows
LDLIBS=-lstdc++

OBJS=devapp.o application.o menu.o module.o msghandler.o window.o

..SUFFIXES: .cpp

..cpp.o:
	$(COMPILE.cc) $< $(OUTPUT_OPTION)

devapp.exe: $(OBJS)
	$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@

clean:
	$(RM) *.o *.exe

------------------------------------------------------------
Uniweb AB                            Phone:  +46 8 626 42 00
P O Box 745                          FAX:    +46 8 626 42 01
S-191 27  SOLLENTUNA
SWEDEN                               http://www.uniweb.se/
-
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