Skip to main content
gamedev.net
🔒 Locked

SDL Question

Started by Pal Aug 2, 2002 at 6:04 PM 4 replies 450+ views
Original Post
Pal
Pal
I''m new to SDL and need some help. I''m running my program on Win 98. Currently the program only creates a window (similar to a "Hello World" senario) However, when I execute the program a Command Window pops up first, followed by the window that I created. Does anyone know how to prevent the command window from popping up? Thanks! Pal
shurcool
shurcool
quote:
Original post by Kylotan
Perhaps try making a Win32 application instead of a Win32 Console Application?


bad idea. all u need to do is place this one line somewhere along you std includes (at the top):
// no console window
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
that''s all! :D

---
shurcool
wwdev
Pal
Pal
quote:

bad idea. all u need to do is place this one line somewhere along you std includes (at the top):
// no console window
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
that's all! :D



That did it!! Thanks shurcool! I searched around and couldn't find out how to do this. Is this documented? I now have another question a little off topic of my original post. What does the #pragma do? Aside from the basics, my C is quite rusty.

Thanks again!
Pal



[edited by - Pal on August 3, 2002 2:29:48 AM]
Kylotan
Kylotan
quote:
Original post by shurcool
bad idea. all u need to do is place this one line somewhere along you std includes (at the top):
// no console window
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
that''s all! :D

No, it''s not a bad idea, because there''s no need to make it a console application unless you want a console!

SDL handles the windows message loop for you and therefore you just code using a standard int main() anyway.



[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.