关于DLL的初级问题,望指教!!
我建了个DLL,不知道对不对,代码如下:
__declspec (dllexport) int add (int,int);
__declspec (dllexport) int add (int a,int b)
{return (a + b);}
然后我就在另一个控制台中调用了
#include <iostream>
__declspec( dllimport ) int add(int a ,int b );
int main()
{
std::cout << Function1(5,10) << std::endl;
system("pause");
return 0;
}
编译器说 [Linker error] undefined reference to `_imp___Z10HelloWorldii'
我用的是 DEVCPP,望知道的,告诉一下!!谢谢!!