Unresolved External

Started by
3 comments, last by Buckeye 13 years, 5 months ago
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 ==========
Advertisement
Did you define the functions as noted by the errors?
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.
HRESULT InitWindow( HINSTANCE hInstance, int nCmdShow );HRESULT InitDevice();void CleanupDevice();LRESULT CALLBACK    WndProc( HWND, UINT, WPARAM, LPARAM );void Render();
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?

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement