Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Nibu babu thomas19-May-06 1:11
Nibu babu thomas19-May-06 1:11 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Hamid_RT19-May-06 1:16
Hamid_RT19-May-06 1:16 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Hamid_RT19-May-06 1:18
Hamid_RT19-May-06 1:18 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Nibu babu thomas19-May-06 1:20
Nibu babu thomas19-May-06 1:20 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Hamid_RT19-May-06 1:25
Hamid_RT19-May-06 1:25 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Naveen19-May-06 1:14
Naveen19-May-06 1:14 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Hamid_RT19-May-06 1:17
Hamid_RT19-May-06 1:17 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Cyber Friend19-May-06 1:54
Cyber Friend19-May-06 1:54 
I have done that but error now changed from LNK2005 to LNK2001 . I m using multiply() function as well from dll but error is only regarding the variable multiplier.
Now error turns to be:

Linking...
CheckTestDllDlg.obj : error LNK2001: unresolved external symbol "int multiplier" (?multiplier@@3HA)
Debug/CheckTestDll.exe : fatal error LNK1120: 1 unresolved externals

n this is dll header file

//////////////////////////////////////////// simple.h/////////////////

#include "String.h"
#include <afxwin.h> // MFC core and standard components

#ifndef SIMPLE_H
#define SIMPLE_H

long multiply(long no);
#endif
///////////////////////////////////////////////////////////////////////

this is cpp file of Dll
////////////////////////////////////////////simple.cpp ///////////////////////////////////
#include "stdio.h"
#include "simple.h"

static long multiplier=14L;
long multiply(long no)

{

long retval;
retval = no * multiplier;

st.Format("Reslt is %d",retval);
MessageBox(NULL,st,"I",MB_OK);
return retval;
}
///////////////////////////////////////////////////////////////////////






Cyber Friend


Cyber Friend
GeneralRe: error LNK2005: ... already defined in ..... Pin
Naveen19-May-06 1:18
Naveen19-May-06 1:18 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Cedric Moonen19-May-06 1:25
Cedric Moonen19-May-06 1:25 
AnswerRe: error LNK2005: ... already defined in ..... Pin
Nibu babu thomas19-May-06 1:05
Nibu babu thomas19-May-06 1:05 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Cyber Friend19-May-06 1:40
Cyber Friend19-May-06 1:40 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Nibu babu thomas19-May-06 1:45
Nibu babu thomas19-May-06 1:45 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Cyber Friend19-May-06 2:24
Cyber Friend19-May-06 2:24 
QuestionCopy Memory Pin
satsumatable19-May-06 0:45
satsumatable19-May-06 0:45 
AnswerRe: Copy Memory Pin
Laxman Auti19-May-06 0:58
Laxman Auti19-May-06 0:58 
GeneralRe: Copy Memory Pin
satsumatable19-May-06 0:59
satsumatable19-May-06 0:59 
AnswerRe: Copy Memory Pin
Laxman Auti19-May-06 1:15
Laxman Auti19-May-06 1:15 
AnswerRe: Copy Memory Pin
Maxwell Chen19-May-06 1:06
Maxwell Chen19-May-06 1:06 
GeneralRe: Copy Memory Pin
NiceNaidu19-May-06 1:21
NiceNaidu19-May-06 1:21 
QuestionFlip an image Pin
anjita19-May-06 0:26
anjita19-May-06 0:26 
AnswerRe: Flip an image Pin
Sarath C19-May-06 0:35
Sarath C19-May-06 0:35 
GeneralRe: Flip an image Pin
anjita19-May-06 0:51
anjita19-May-06 0:51 
AnswerRe: Flip an image Pin
NiceNaidu19-May-06 0:52
NiceNaidu19-May-06 0:52 
GeneralRe: Flip an image Pin
anjita19-May-06 1:59
anjita19-May-06 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.