#### Archived

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

# This is going to sound really dumb.....

## Recommended Posts

I''m a newbiwe programmer, and I just now got VC++ 6 and I have a really stupid problem. I''m trying to get a program where I just go into directx and get back out....but I get a linker error ''unidentified symbol _main''....and I''m new to VC++ so I don''t know what I''m doing wrong. I think I put all the libs in right. (I know, stubid problem. but what do you expect from a newbie? )

##### Share on other sites
Make sure you''ve started the project as a Win32 app, not a console app.

//////////////////////////VGASteve//////////////////////////////////////
See my projects!

##### Share on other sites
Well, do you have a void main() or int main() in your program? Windows programs don''t have main loops like that since it is event-driven, but there is a Winmain. If you created a win32 app make sure you don''t just have a main() loop that you would find in console programs.

Masters Software

##### Share on other sites
well, I did make it a win32 app, you pick that when you start the workspace, right? And I''m using the WinMain thing...

##### Share on other sites
If you have the WinMain function and its set up correctly then sometimes just save your code and delete the project this will clear any compiler setting problems you minght have accidently created. Then create a new project and include libs and your saved source code plus all of the headers and recompile the new app. This works unless its a problem with your windows code. I used to get this problem all the time when I was a newb 2 years ago.

DXGP

##### Share on other sites
jtecin for your info. only, Win apps do have a main() function. Its just hidden in the win32 .dll''s so you never get to see it

ECKILLER

• ### Forum Statistics

• Total Topics
628305
• Total Posts
2981967

• 9
• 13
• 11
• 12
• 11