Advertisement Jump to content
Sign in to follow this  

Linking error LNK2019 (LIBCD.lib)

This topic is 4880 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")
#pragma comment(lib, "d3dx9.lib")

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

#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
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!