Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Jell

how to link a library at load time??

This topic is 5236 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ???

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Under VC++ .NET you need to go Project Settings->Linker->Input->Additional Dependencies

Or use T2k''s method.

Share this post


Link to post
Share on other sites
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..!!!!!


Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!