News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Set Entry Point?

Started by fl4ke, January 09, 2007, 11:43:30 PM

Previous topic - Next topic

fl4ke

Hello

I'm using C::B for a wile now and I never had any problems. But today I started a new Project, which uses some OpenGL functions.
I get a linker error because there is also a main() function in my code but it's a Windows GUI app.

MSDN has got a solution for the problem:
QuoteIn the Output category of the Link tab in the Project Settings dialog box, set the Entry Point Symbol to wWinMainCRTStartup.

For Visual C++ .NET: In the Advanced category of the Linker folder in the Project Properties dialog box, set the Entry Point to wWinMainCRTStartup.

And here is my question: Where can I set this entry point in C::B?
I couldn't find anything like this!

I'm using VC++ Toolkit 2003

Thanks!

MortenMacFly

Quote from: fl4ke on January 09, 2007, 11:43:30 PM
And here is my question: Where can I set this entry point in C::B?
I couldn't find anything like this!
Set /entry:"wWinMainCRTStartup" in the additional linker options and that should be it.. You could also "ifdef" your "old" main function.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]