Jump to content
  • Advertisement
Sign in to follow this  
eben

Help compiling my first directx program...

This topic is 4776 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'm having a bit of trouble with directx and I am using Visual Studio 2003. Let me describe the situation: I am trying to compile the first sample program from "Tricks of the Windows Game Programming Gurus". I installed directx 9, even though the author says the samples in the book are written for directx 7/8 (I didn't think having the newest version was a problem and neither did the others I asked). I then dragged and dropped the directx lib files from "C:\Program Files\Microsoft DirectX 9.0 SDK (June 2005)\Lib\x86" into my project as the book said to do(more or less since the instructions in the book were actually for Visual Studio 6 and directx 8 -- I just tried to do the same for my setup). Now I am left with errors when I compile: -- Freakout error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup -- Freakout fatal error LNK1120: 1 unresolved externals Where "Freakout" is the name of the file, not a terrible class of error :) edit: I thought I would post the files and hope a nice person wants to help a noob out. Thanks again :) http://eben.50megs.com/blackbox.cpp http://eben.50megs.com/blackbox.h http://eben.50megs.com/freakout.cpp << main game file [Edited by - eben on July 20, 2005 11:05:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
The problem is that you've created a Win32 console application, whose entry point is "main". However, you should be creating a Win32 application, whose entry point is WinMain. Either change your project settings (say, by changing "subsytem:console" to "subsystem:windows" in the generated command-line build command) or create a new Win32 application project.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!