Win32 Programming Help, Please


namco

Member
Joined
Mar 22, 2006
Messages
410
Age
42
Location
Manchester, UK
Website
www.stupendous-stuff.com
To suppliment my income I've been searching for freelance work and I have one that is writing an interactive screensaver.

I've found the relevant code and such, esp writing under MinGW, however, when compiling I get:

CODE

undefined reference to DefScreenSaverProc@16
undefined reference to WinMain@16
//WinMain doesn't appear in the code and isn't mean't to because it's an .scr not an .exe!




my compile line is:

CODE

g++ -mwindows test3.cpp -o test3



Thanks.
 
Last edited by a moderator:
namco said:
To suppliment my income I've been searching for freelance work and I have one that is writing an interactive screensaver.

I've found the relevant code and such, esp writing under MinGW, however, when compiling I get:

CODE

undefined reference to DefScreenSaverProc@16
undefined reference to WinMain@16
//WinMain doesn't appear in the code and isn't mean't to because it's an .scr not an .exe!

my compile line is:

CODE

g++ -mwindows test3.cpp -o test3



Thanks.

I think you need to define WinMain in your code: CODE
http://forums.devshed.com/c-programming-42/linker-error-undefined-reference-to-winmain-16t-369131.html
 
Last edited by a moderator:
Got it.

I just copied the makefile from my gp2x projects and tailored it.

Works now! :)

I was trying to compile just typing in the command line and wondered why Dev-Cpp would easily compile it and I couldn't.

WinMain isn't used in screensavers:
CODE

http://www.osix.net/modules/article/?id=538



Thanks again.
 
Last edited by a moderator:
Back
Top