Jump to content
  • Advertisement
Sign in to follow this  
Daggerbot

[C/C++] wmain

This topic is 3693 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a quick question. Do build environments such as GCC (Linux) and Xcode (Mac) use the wmain function like VC++ (Windows) does? Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
First of all I think you're thinking of winmain(). And the answer is no.

The entry point of an ISO C++ program is int main(), however compilers (Visual Studio included) all you to redefine the programs entry point.

Share this post


Link to post
Share on other sites
Quote:
Original post by fpsgamer
First of all I think you're thinking of winmain(). And the answer is no.


I'm not thinking of WinMain. I'm thinking of wmain, the unicode version of main.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daggerbot
Quote:
Original post by fpsgamer
First of all I think you're thinking of winmain(). And the answer is no.


I'm not thinking of WinMain. I'm thinking of wmain, the unicode version of main.


My bad. But upon checking MSDN's entry for wmain , it describes it as "Microsoft specific".

Share this post


Link to post
Share on other sites
Ah thanks. I think for now I'll just convert the char** parameter to wchar_t**, until I figure out the Mac and Linux specific ways of getting unicode parameters.

Share this post


Link to post
Share on other sites
Wow I guess you really do learn something new all the time especially when it comes to C/C++. First time I ever heard of wmain and from what I can gather it's implementation dependent so you'll have to write you code specifically to whatever compiler/platform you plan on using.
THE C/C++, main() AND COMMAND-LINE ARGUMENT

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
Wow I guess you really do learn something new all the time especially when it comes to C/C++. First time I ever heard of wmain and from what I can gather it's implementation dependent so you'll have to write you code specifically to whatever compiler/platform you plan on using.
THE C/C++, main() AND COMMAND-LINE ARGUMENT


There's also the _T version, _tmain().

However, personally, I hate Microsoft's _T() macro stuff and refuse to use it. I understand their somewhat noble intention behind it, but it's macro hell. yuck.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!