//this is my DLL code
//this compiles fine , i copy dll.dll and dll.lib to the cpp where main is ...Code:#include "stdafx.h" #include <stdio.h> extern "C" __declspec(dllexport)void test(); BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } class __declspec(dllexport) MyClass { int myInt; }; extern "C" __declspec (dllexport) MyClass;
//this is the main cpp file
Code:#include <iostream.h> #pragma comment(lib , "dll.lib") extern "C" __declspec (dllexport) MyClass; int main() { MyClass My; //but i am unable todo this ??????????? return 0; }



LinkBack URL
About LinkBacks



