-
May 26th, 2009, 01:20 PM
#1
[Sloved] (Directx Related) unresolved external symbol _main
Code:
-------------------Configuration: d3dxconsoletest - Win32 Debug--------------------
Compiling...
scr.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/d3dxconsoletest.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
d3dxconsoletest.exe - 2 error(s), 0 warning(s)
I'm completely new to directx and tried this tutorial:
http://www.directxtutorial.com/Tutor...ics/dx9B1.aspx
(you can see the hole code at the end, i didn't posted it because it takes a lot of space)
I made a console application and i have the march 2009 directx SDK.
Please help me resolve this issue.
Last edited by Darkov; May 26th, 2009 at 05:55 PM.
Reason: because its sloved now
-
May 26th, 2009, 01:29 PM
#2
Re: [Unsloved] (Directx Related) unresolved external symbol _main
Do you have a main() function?
-
May 26th, 2009, 01:57 PM
#3
Re: [Unsloved] (Directx Related) unresolved external symbol _main
Originally Posted by Lindley
Do you have a main() function?
No.
In the tutorial there was no main function.
-
May 26th, 2009, 02:00 PM
#4
Re: [Unsloved] (Directx Related) unresolved external symbol _main
Well, then something's wrong with the tutorial. I mean, where do you *expect* control to begin when you launch the app?
EDIT: It appears the tutorial is using WinMain() as the entry point. You'll need to change your project type from Console Application to Windows Application if you want to use that entry point. I'm not sure if that actually makes a difference as far as ability to use D3D, though.
Last edited by Lindley; May 26th, 2009 at 02:03 PM.
-
May 26th, 2009, 05:54 PM
#5
Re: [Unsloved] (Directx Related) unresolved external symbol _main
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|