954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Direct X 10 compiling problem, MSVCRTD.lib?

1>------ Build started: Project: DirectXtutrials, Configuration: Debug Win32 ------
1>Build started 3/24/2011 5:24:05 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\DirectXtutrials.unsuccessfulbuild".
1>ClCompile:
1>  main.cpp
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\Konnor\Documents\Visual Studio 2010\Projects\DirectXtutrials\Debug\DirectXtutrials.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:07.66
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


So that's whats wrong with my code. The source code doesn't matter because i've tried multiple source codes and it still doesn't work. I'm trying to learn directX 10 and for some reason its not compiling. Does anyone know what i should do?


Also this is my code: (directly out of a programming direct X book)

// Basic Direct-X program
#include <windows.h>

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	MessageBox(NULL, "This is a sample program for windows API!", "EXAMPLE", MB_OK | MB_ICONEXCLAMATION);
}
Khoanyneosr
Junior Poster in Training
61 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You