I've seen it on MSDN
in the same directory i have a table.dll with dllmain.cpp and table.cpp.In table.cpp i have declared a function: int _stdcall tablemain(int&login)
the def file looks like:
LIBRARY "table.dll"
I've followed what that page said and it worked for me without problems. If you're still having problems, I'm not sure what to suggest.
EDIT:
Actually look at the top right of the page I suggested at the 'Export from a Dll' link. This is a drop down menu. Have a look at these to see if any of them are of any use.
2>System.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl tablemain(int &)" (__imp_?tablemain@@YAXAAH@Z) referenced in function "void __cdecl tables(void)" (?tables@@YAXXZ)
2>C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\System\Debug\System.exe : fatal error LNK1120: 1 unresolved externals
I get this error....I nhave in front of table.cpp __declspec(dllexport) void __cdecl tablemain(int&); and int the declarations in system.cpp: __declspec( dllimport ) void tablemain(int&);
This is my call to the function:
void tables()
{
tablemain(logflag);
}
Sorry, it was an obvious thing but your link error is saying that your dll object code isn't being included in the link command for the executable. You have called a function but the object code for that function cannot be found by the linker.
I'm not familiar enough with VS2008 to be able to give you much more than I have already, sorry. I'm sure someone else will know but you may have to wait for people to wake up in the various time zones around the globe.