Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Calling global function causing linking error. Pin
prasad_som10-Feb-09 3:34
prasad_som10-Feb-09 3:34 
AnswerRe: Calling global function causing linking error. Pin
Comp_Users10-Feb-09 3:40
Comp_Users10-Feb-09 3:40 
AnswerRe: Calling global function causing linking error. Pin
prasad_som10-Feb-09 3:41
prasad_som10-Feb-09 3:41 
GeneralRe: Calling global function causing linking error. Pin
Comp_Users10-Feb-09 3:54
Comp_Users10-Feb-09 3:54 
GeneralRe: Calling global function causing linking error. Pin
Cedric Moonen10-Feb-09 4:11
Cedric Moonen10-Feb-09 4:11 
GeneralRe: Calling global function causing linking error. Pin
CPallini10-Feb-09 3:49
mveCPallini10-Feb-09 3:49 
GeneralRe: Calling global function causing linking error. Pin
Comp_Users10-Feb-09 3:55
Comp_Users10-Feb-09 3:55 
GeneralRe: Calling global function causing linking error. Pin
David Crow10-Feb-09 5:03
David Crow10-Feb-09 5:03 
Comp_Users wrote:
Could you please tell me as to what is causing this to happen?


The linker is telling you exactly what the problem is.

You need to put the function declarations in a .h file like:

#if !defined(ABC123)
#define ABC123
 
#pragma once
 
int TrimMyString();
int PaintMyHouse();
int SellMyStock();
 
#endif
You need to put the function definitions in a .cpp file. Make sure both files are added to the project. Then in any file that will be using those functions, simply #include the .h file near the top.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch


AnswerRe: Calling global function causing linking error. Pin
Iain Clarke, Warrior Programmer10-Feb-09 5:54
Iain Clarke, Warrior Programmer10-Feb-09 5:54 
GeneralRe: Calling global function causing linking error. Pin
Comp_Users10-Feb-09 18:25
Comp_Users10-Feb-09 18:25 
GeneralRe: Calling global function causing linking error. Pin
Comp_Users10-Feb-09 18:36
Comp_Users10-Feb-09 18:36 
QuestionCalling C# DLL into core C++ Console application [modified] Pin
PankajB10-Feb-09 2:09
PankajB10-Feb-09 2:09 
AnswerRe: Calling C# DLL into core C++ Console application Pin
led mike10-Feb-09 4:30
led mike10-Feb-09 4:30 
AnswerRe: Calling C# DLL into core C++ Console application Pin
Eytukan10-Feb-09 8:43
Eytukan10-Feb-09 8:43 
QuestionHow to update single view Pin
KASR110-Feb-09 2:04
KASR110-Feb-09 2:04 
AnswerRe: How to update single view Pin
Maximilien10-Feb-09 2:43
Maximilien10-Feb-09 2:43 
AnswerRe: How to update single view Pin
David Crow10-Feb-09 3:00
David Crow10-Feb-09 3:00 
QuestionWinAPI Service StartServiceCtrlDispatcher gives Error-Code "1063" Pin
Harry_D10-Feb-09 0:37
Harry_D10-Feb-09 0:37 
AnswerRe: WinAPI Service StartServiceCtrlDispatcher gives Error-Code "1063" [modified] Pin
_AnsHUMAN_ 10-Feb-09 0:48
_AnsHUMAN_ 10-Feb-09 0:48 
GeneralRe: WinAPI Service StartServiceCtrlDispatcher gives Error-Code "1063" Pin
Harry_D10-Feb-09 6:21
Harry_D10-Feb-09 6:21 
AnswerRe: WinAPI Service StartServiceCtrlDispatcher gives Error-Code "1063" Pin
BukeMan6-Jul-11 0:08
BukeMan6-Jul-11 0:08 
QuestionHow to add and retrive the LPARAM value from CTreeCtrl? Pin
mikert_20089-Feb-09 23:22
mikert_20089-Feb-09 23:22 
AnswerRe: How to add and retrive the LPARAM value from CTreeCtrl? Pin
CPallini9-Feb-09 23:44
mveCPallini9-Feb-09 23:44 
GeneralRe: How to add and retrive the LPARAM value from CTreeCtrl? Pin
mikert_200810-Feb-09 0:01
mikert_200810-Feb-09 0:01 
GeneralRe: How to add and retrive the LPARAM value from CTreeCtrl? Pin
CPallini10-Feb-09 0:37
mveCPallini10-Feb-09 0:37 

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.