🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Error in Visual C++?
I''m new to programming with opengl and glide. I use Visual C++ 5.0 to compile my programs. But for some reason, any time I write an opengl or glide program it gives me a error such as "unresolved external symbol __winmain@16.". Or something like that. Like I said, I''m new and can''t figure out whats causing this. Anyone who has had this problem please let me know how you fixed it.
Yep. Win32 app and linking to glide for sure. I read somewhere ( some other message board I believe ) that you needed to include dinput.h (or something like that) in your app. But tried that and it didn''t work.
Maybe I misread soemthing or am missing the point, but I get this error:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
if I misspell or omit the function:
int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
(Which is analogous to the main() of a console app)
Maybe this''ll help, I''m just covering the most obvious base first
-ns
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
if I misspell or omit the function:
int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
(Which is analogous to the main() of a console app)
Maybe this''ll help, I''m just covering the most obvious base first
-ns
I got that message before (since I''m new as well), and I think you need to write a WinMain function (the return type is very long and I don''t remember it off-hand. Try looking for some tutorials around with that function). If you have that function in, the error won''t appear (I think... I''ve tried lots of things and this is one of them. I''m not 100% sure if this is the exact solution or not)
Being a Glide/OpenGL programmer you may have come from a Unix/Linux background so you may need to pick up a little bit of Win32. I am not questioning your abilities so please don''t flame me =)
Best regards,
Sherman
Best regards,
Sherman
Didn''t you have a WinMain function?
I thought so...
You gotta have it you know, when you write win32 programs.
I thought so...
You gotta have it you know, when you write win32 programs.
I won''t flame ya'' Sherman.
I have the winmain function included. I fixed my problem though so everythings ok. It seems that when I was downloading source code from the net and opening it in VC++,
it was opening it as a console app. Don''t know why but thats what it was doing. Thanks for the help guys.
I have the winmain function included. I fixed my problem though so everythings ok. It seems that when I was downloading source code from the net and opening it in VC++,
it was opening it as a console app. Don''t know why but thats what it was doing. Thanks for the help guys.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement