[Dev-C++] Linker error Undefined Reference
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Peter S. <dy...@ya...> - 2003-03-26 15:14:57
|
Hi,
I am trying to create a sample dll file to be read by
vb. This is just a test to see if I can do it, but if
it succeeds, I will write a true one.
The cpp file is:
#include "Sample.h"
int _stdcall sum(int a, int b)
{
int result;
result = a + b;
return result;
}
The h file is:
int _stdcall sum(int a, int b);
The def file is:
LIBRARY Sample.dll
EXPORTS
sum
When I compile I get the linker error:
undefined reference to 'sum'
Is this a bug, or are I doing something wrong?
Thank you,
Peter Stern
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
|