Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Creating Dll in VC++ 2008

Status
Not open for further replies.

srija

Member level 1
Member level 1
Joined
Oct 26, 2011
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore
Activity points
1,567
hi everybody
Can anybody tell me how to resolve the following error??
I created dll and trying to use the dll in another project.

unresolved external symbol "public: static int __cdecl Dll::add(int,int)" (?add@Dll@@SAHHH@Z) referenced in function _main



I copied and pasted the .lib and.h and .dll file in the new project folder and using the code as

error LNK2019: unresolved external symbol "public: static double __cdecl MyMathFuncs::Add(double,double)" (?Add@MyMathFuncs@@SANNN@Z) referenced in function _main


#include "Dll.h"
#include <iostream>

using namespace std;

int main()
{
double a = 7.4;
int b = 99;

cout << "a + b = " <<
MyMathFuncs::Add(a, b) << endl;
}



thanking you in advance
 

I think in case of dll you need to add the dll to the reference of your project.....do this go to solution explore of your project....there will be references in that...left click on that reference ....you will get add referecne ....in that add the correspoding dll in that......

Good Luck
 

But when i am browsing to add those .lib file s and directories the browser showing "no items match".
so that i just copied paste the path of those files and folders.
 

sry i dont have youtube access......Anyway thanku for the help

But i think thr is no need of dll file for project because if we attach the .lib file it will automatically call the .dll file at runtime i think.
but my problem is how to attach the .lib file and directory to the project..........
 

you can add the library by right clicking on project ->properties->Linker->Input->Additional Dependencies-> (add your library over here)
then do apply ->ok
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top