Jump to content
  • Advertisement
Sign in to follow this  
Skute

Linking error LNK2019 (LIBCD.lib)

This topic is 4817 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

Hi all, Im getting the following error: LIBCMTD.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup Now, my project did work fine until a moment ago when i deleted a file from my project (which was redundant now anyway). But i cant get this error to go away. Ive tried switching from debug to release CRT dlls, no difference, tried multi-threaded and single threaded. I presume its a conflict some how with the directx dlls, here is how im referencing the header and library files:
#pragma once

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "dxerr9.lib")
#ifdef _DEBUG
#pragma comment(lib, "d3dx9d.lib")
#else
#pragma comment(lib, "d3dx9.lib")
#endif

#if defined(_DEBUG) && !defined(D3D_DEBUG_INFO)
#define D3D_DEBUG_INFO
#endif

#include <d3d9.h>
#include <d3dx9.h>
#include <dxerr9.h>

Any help is much appreciated. P.S. Dont tell me im using the wrong project type - console / application etc. Thats not the issue here. Cheers,

Share this post


Link to post
Share on other sites
Advertisement
fixed the problem, the file i deleted contained the <tchar.h> file.
my winmain is defined as _tWinMain, so obviously it couldnt find the WinMain / wWinMain function.

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!