how to link a library at load time??
i have to link a library to my vc++.net project at load time.
where in Project Properties should i specify the path for the library or the library name ??
right now i am specifying it under Configuration Properties->Linker->General->Additional Library Directories
but this is not linking the library ???
hmm my config is broken, i think i need to reinstall my ide, but you can always use this in one of your cpp files(AFAIK):
#pragma comment(lib, "opengl32.lib")
T2l
#pragma comment(lib, "opengl32.lib")
T2l
Under VC++ .NET you need to go Project Settings->Linker->Input->Additional Dependencies
Or use T2k''s method.
Or use T2k''s method.
There is more to the problem tough, so i have also posted t separately on the forum...but if u can reply...it wud be great help--
I am linking an unmanaged library at Load time in my vc++.net project.
#pragma comment(lib,"xyz.lib")
This library exports a simple method which returns "42".
exported method code is:
CPPCLASSEXPORT_API int Test(void)
{
return 42;
}
The code is Building properly.
BUT---- when i run the application (actually a vc++.net web service) i get an error page.
saying
"Configuration Error :
Parser Error Message: File or assembly name TestClassExport, or one of its dependencies, was not found.
"
same library if i test using an MFC exe application, is working fine.i.e. the method returns 42 to the MFC client.
so if u can help me out to understand what is happening..!!!!!
I am linking an unmanaged library at Load time in my vc++.net project.
#pragma comment(lib,"xyz.lib")
This library exports a simple method which returns "42".
exported method code is:
CPPCLASSEXPORT_API int Test(void)
{
return 42;
}
The code is Building properly.
BUT---- when i run the application (actually a vc++.net web service) i get an error page.
saying
"Configuration Error :
Parser Error Message: File or assembly name TestClassExport, or one of its dependencies, was not found.
"
same library if i test using an MFC exe application, is working fine.i.e. the method returns 42 to the MFC client.
so if u can help me out to understand what is happening..!!!!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement