Archived

This topic is now archived and is closed to further replies.

BLurnewbie

2 errors i can't solve

Recommended Posts

Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/ftg.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ftg.exe - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
I''m a newbie to Windows programming myself, but from looking at that it looks like you are trying to compile your library as an application.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Search Google, and you''ll find your solution.

Share this post


Link to post
Share on other sites
You might have forgotten your WinMain() funktion in your app.

[edited by - Jonus on September 1, 2002 7:50:50 PM]

Share this post


Link to post
Share on other sites
BLur: Post your code if it isn''t too big. I''m not certain what you did wrong, but I have suspicions that''ll require a bit of explanation if allayed.

For now, understand that you''ll almost definitely want to create your OpenGL applications as "Win32 Application"''s instead of "Win32 Console Application"''s. This will require you to know Win32 programming and write a WinMain.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites
They have internet in antarctica??



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

[edited by - TheBlackJester on September 1, 2002 10:42:11 PM]

Share this post


Link to post
Share on other sites
Try choosing the option to recompile all files. Sometimes you will get the error if your main file is compiled and you try to recompile another file that is linked into the main file.

Share this post


Link to post
Share on other sites
try this at the top of your main source file :

#pragma comment( linker, "/ENTRY:WinMainCRTStartup" )
#pragma comment( linker, "/SUBSYSTEM:WINDOWS" )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by BLurnewbie
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/ftg.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

ftg.exe - 2 error(s), 0 warning(s)


This error happens when you have created the wrong msvc project type. Any programs that contain a main() function are "win32 console applications" Any programs that contain a WinMain() function are "win32 applications" It appears that you created a win32 application, and your code only contains a main() function. main() is not the right entry point for this type of application, so the compiler gets confused and will not compile the code giving you the error you see above.

Share this post


Link to post
Share on other sites
@The Latest Anonymous Poster:

Yeah, that''s true, and it''s what I based my original reply on, but think about it. We''re in the OpenGL forum. Most of the people who use OpenGL in a MSOS run it under Win32, not DOS. Therefore, it''s my suspicion that he knows what type of application to create, but that he doesn''t know Win32 programming. That could be totally false, but it makes sense to me.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites