Jump to content
  • Advertisement

Archived

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

tylerbingham

using more than 1 .dll in a c/c++ project

This topic is 5773 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 know how to use a .dll in a project, but I have run into a problem trying to pick which .dll I want to use. this is a sample of the problem::: // dlluser.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "main.h" char str[255]; int main(int nNumberofArgs, char* pszArgs[]) { cout<<"which .dll do you want to load( 1 or 2 )"<< endl << endl; cin>>str; if(0 == strcmp ("2",str)) { // #pragma comment(lib,"dll2.lib") printMessage(); } if(0 == strcmp ("1",str)) { // #pragma comment(lib,"dll1.lib") printMessage(); } return 0; } THIS CODE DOES NOT WORK!!!....if someone could help me it would be much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
you are trying to dynamically link to a DLL at runtime using the syntax for statically linking at compile time.
listen to niyaw

*** 500 ERROR ***

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!