Subject: B20: Using -mwindows results in link warning.
From: [email-masked] (Jens Yllman)

6 Nov 1998 12:40:33 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

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