Sign in to follow this  
Nerkmind

Unresolved External

Recommended Posts

Hello , as im trying to compile my noob code , i keep getting that error
; Unresolved External

i wish to know wth im doing wrong

The error :

1>------ Build started: Project: Nerkmind, Configuration: Debug Win32 ------
1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl Render(void)" (?Render@@YAXXZ) referenced in function _wWinMain@16
1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl CleanupDevice(void)" (?CleanupDevice@@YAXXZ) referenced in function _wWinMain@16
1>Main.obj : error LNK2019: unresolved external symbol "long __cdecl InitDevice(void)" (?InitDevice@@YAJXZ) referenced in function _wWinMain@16
1>Main.obj : error LNK2019: unresolved external symbol "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) referenced in function "long __cdecl InitWindow(struct HINSTANCE__ *,int)" (?InitWindow@@YAJPAUHINSTANCE__@@H@Z)
1>C:\Users\Michael\documents\visual studio 2010\Projects\Nerkmind\Debug\Nerkmind.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Share this post


Link to post
Share on other sites
It would be helpful if you posted the first line of your functions from your .cpp file. For example:

void Render() {
void CleanupDevice() {
etc...

This way we can compare your function definitions, versus what your linker is looking for. This error indicates that they somehow do not match.

Share this post


Link to post
Share on other sites
HRESULT InitWindow( HINSTANCE hInstance, int nCmdShow );
HRESULT InitDevice();
void CleanupDevice();
LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );
void Render();

Share this post


Link to post
Share on other sites
As oler1s and Xenkan are trying to get at, what you posted are declarations of the functions. You have to define those functions. I.e., there has to be code defined for those functions, else they don't exist.

E.g.,

HRESULT InitDevice()
{
D3DCreate..(..); // etc.
}

Have you written that code?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this