Dll creation in VC++ 2008

hi everybody
Can anybody tell me how to resolve the following error??
I created dll and trying to use the dll in another project.

unresolved external symbol "public: static int __cdecl Dll::add(int,int)" (?add@Dll@@SAHHH@Z) referenced in function _main


I copied and pasted the .lib and.h and .dll file in the new project folder and using the code as

1
2
3
4
5
6
7
8
9
10
11
#include "Dll.h"
#pragma comment (DLL,"Dll.lib")
#include <iostream>

using namespace std;

int main()
{
	cout << Dll::add(32, 58) << "\n";
	return 0;
}


thanking you inadvance
closed account (1yR4jE8b)
Are you sure the .lib is being properly linked? You'll need to add the directory the .lib file is in to the "Additional Directories", as well as put it as an "Additional Dependencies" under the linker options in the project properties.
Last edited on
But when i am browsing to add those .lib file s and directories the browser showing "no items match".
so that i just copied paste the path of those files and folders.
Topic archived. No new replies allowed.