Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is there a Parent Child realtionship with regards to threads Pin
Stephen Hewitt12-Apr-10 4:26
Stephen Hewitt12-Apr-10 4:26 
QuestionOpen Source Projects? Pin
Jasonweber71911-Apr-10 11:03
Jasonweber71911-Apr-10 11:03 
AnswerRe: Open Source Projects? Pin
Maximilien11-Apr-10 12:22
Maximilien11-Apr-10 12:22 
AnswerRe: Open Source Projects? Pin
Fareed Rizkalla11-Apr-10 15:11
Fareed Rizkalla11-Apr-10 15:11 
AnswerRe: Open Source Projects? Pin
Saurabh.Garg11-Apr-10 17:32
Saurabh.Garg11-Apr-10 17:32 
QuestionListView / Win32 Pin
Fareed Rizkalla11-Apr-10 9:44
Fareed Rizkalla11-Apr-10 9:44 
AnswerRe: ListView / Win32 Pin
Richard MacCutchan11-Apr-10 22:28
mveRichard MacCutchan11-Apr-10 22:28 
GeneralRe: ListView / Win32 Pin
Fareed Rizkalla11-Apr-10 23:29
Fareed Rizkalla11-Apr-10 23:29 
GeneralRe: ListView / Win32 Pin
Richard MacCutchan18-Apr-10 4:45
mveRichard MacCutchan18-Apr-10 4:45 
AnswerRe: ListView / Win32 Pin
peterchen12-Apr-10 20:28
peterchen12-Apr-10 20:28 
QuestionComboBox / Win32 Pin
Fareed Rizkalla11-Apr-10 9:42
Fareed Rizkalla11-Apr-10 9:42 
QuestionC++ class pointers Pin
rupeshkp72811-Apr-10 6:52
rupeshkp72811-Apr-10 6:52 
AnswerRe: C++ class pointers Pin
peterchen11-Apr-10 8:25
peterchen11-Apr-10 8:25 
GeneralRe: C++ class pointers [modified] Pin
Joe Woodbury11-Apr-10 13:52
professionalJoe Woodbury11-Apr-10 13:52 
GeneralRe: C++ class pointers Pin
peterchen12-Apr-10 0:04
peterchen12-Apr-10 0:04 
GeneralRe: C++ class pointers Pin
Joe Woodbury12-Apr-10 6:30
professionalJoe Woodbury12-Apr-10 6:30 
GeneralRe: C++ class pointers Pin
peterchen12-Apr-10 20:27
peterchen12-Apr-10 20:27 
GeneralRe: C++ class pointers Pin
Tim Craig11-Apr-10 17:32
Tim Craig11-Apr-10 17:32 
GeneralRe: C++ class pointers Pin
rupeshkp72811-Apr-10 19:30
rupeshkp72811-Apr-10 19:30 
GeneralRe: C++ class pointers Pin
peterchen12-Apr-10 20:33
peterchen12-Apr-10 20:33 
GeneralRe: C++ class pointers Pin
Tim Craig12-Apr-10 21:00
Tim Craig12-Apr-10 21:00 
AnswerRe: C++ class pointers Pin
Emilio Garavaglia11-Apr-10 20:58
Emilio Garavaglia11-Apr-10 20:58 
QuestionC++Linking Classes/.cpp files to run one after other? Pin
FinalDecap11-Apr-10 5:59
FinalDecap11-Apr-10 5:59 
This is probably a really stupid thing to ask considering the development I'm doing (effectivly creating a virus scanner), but how do I link classes/cpp files?

I have 3 applications/sections that I can compile/combine with a makefile, that's fine, but I need them to run 1, 2, 3 once the output from the makefile is done.

Currently the only section to actually run is whichever I have "main" in and obviously if I put that into all three, they won't compile as one.

I've been looking all over the place at all sorts, header files and such, but there is no mention of how to actually do this although I'm sure it must be possible. I'm used to being able to do this in Java and I'm sure I've seen C++ applications do it, but not worked out how.

I have 3x .cpp files which are combined into one using a makefile:

# Virus Scanner

scanner.out : ProgramList.o MD5Hash.o HazardCheck.o
	g++ -o scanner.out ProgramList.o MD5Hash.o HazardCheck.o /usr/lib/libstdc++.so.5 CONFIG/rudeconfig.lib HASH/src/libhl++.a

ProgramList.o: PROGRAMS/ProgramList.cpp
	g++ -c PROGRAMS/ProgramList.cpp

MD5Hash.o: HASH/MD5Hash.cpp
	g++ -c HASH/MD5Hash.cpp

HazardCheck.o: CONFIG/HazardCheck.cpp CONFIG/hazard.conf
	g++ -c CONFIG/HazardCheck.cpp 

clean:
	rm *.o scanner.out

#END OF MAKE FILE 


scanner.out will run, but only whichever .cpp has "main()" in it, so the other two are defunct but are included within scanner.out. If I compile the three files separately I end up with three programs, but I need them to work together as a single application.

I'm doing all my work on Linux using vi to edit the files, but I assume what I want to do is generic between systems.

Any/All help is appreciated.
AnswerRe: C++Linking Classes/.cpp files to run one after other? Pin
Cedric Moonen11-Apr-10 20:57
Cedric Moonen11-Apr-10 20:57 
QuestionArray indexes Pin
Farraj10-Apr-10 23:46
Farraj10-Apr-10 23:46 

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.