|
-
Feb 8th, 2002, 11:21 AM
#1
Thread Starter
Addicted Member
Wndproc
Dows anyone know how to define the WNDPROC type?
Always looking for a better and faster way!
-
Feb 12th, 2002, 03:15 PM
#2
Thread Starter
Addicted Member
I define an API function as so:
Code:
#define WINUSERAPI
#define IN
WINUSERAPI void * __stdcall LoadIcon(IN void *hInstance, IN const unsigned short *lpIconName);
I get this error:
--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
Linking...
Test.obj : error LNK2001: unresolved external symbol "void * __stdcall LoadIcon(void *,unsigned short const *)" (?LoadIcon@@YGPAXPAXPBG@Z)
Debug/Test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Test.exe - 2 error(s), 0 warning(s)
Any Ideas?
Always looking for a better and faster way!
-
Feb 12th, 2002, 04:14 PM
#3
This is because a C++ compiler gives the functions other internal names than a C compiler. Write
extern "C" WINUSERAPI void * __stdcall LoadIcon(IN void *hInstance, IN const unsigned short *lpIconName);
This will tell the compiler to use the C naming convention.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|