tags:

views:

34

answers:

1

I have compiled a simple win32 app successfully with bc++ (2 lines excerpt only):

LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

wincl.lpfnWndProc = WindowProcedure;     

Why can't I rename WindowProcedure and compile this:

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);

wincl.lpfnWndProc = WndProc;

as error message gives:

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external 'stdcall WndProc(HWND *, unsigned int, unsigned int, long)' referenced from C:\PROGRAMMING\SALLY\WIN32TUTORIAL\MAIN.OBJ

+2  A: 

This is a linker error, not a compiler error. It looks like you have renamed the declaration but not the definition. You need to rename the definition (the part that includes the {body of the function}).

sean e
sorry I'm absolute beginner. Do I have to change something in windows.h perhaps ?
If you do a text search for WindowProcedure in your project, are there any hits?
sean e
OK thank you it was at the end I didn't see it in the first place.