|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
my problems with MAKEFILE command
Hi everyone. I'm a newbies in using c++ in UNIX. And since then I only do maintenance coding not development. so far i understand c++ coding and OOP concepts.
currently i'm working onsomething for maintenance purpose.here's the situation : below are my files : source files: advDisc.cpp -- contains the main method AdvDiscCtrl.cpp -- contains class implementation AppLog.cpp -- source for writing application log ErrLog.cpp -- to write error log if any ITConversion.cpp -- codes for conversion of units n so on Config.cpp header files AdvDiscCtrl.h -- contains class definition AppLog.h -- contains definition for AppLog.cpp ErrLog.h -- contains definition for ErrLog.cpp Config.h -- database configuration n so on.. my makefile.jrnl contains the object of : advDisc.o Config.o AppLog.o ErrLog.o ITConversion.o AdvDiscCtrl.o all: advDisc my problem is when i add new methods in my AdvDiscCtrl.cpp along with in AdvDiscCtrl.h files, there is nothing wrong in compilation. no errors. but i cant call the methods from my main. nothing happen. i mean no output as expected. fyi, my new new methods are the same as defined before but i only change its name n into which table it is suppose to insert the output. it went well if i exclude my new methods. got the output. i am so so do not understand why it doesn't run my new methods. i've been stuck with this for a few weeks... please help me.. thanx a lot.. |
| Sponsored Links | |
|
|
|
#2
|
||||
|
||||
|
<but i cant call the methods from my main. nothing happen. i mean no output as expected.>
what does it mean, what happens if you call the method, does it give you run time error or what. Why dont you add cout statements in your functions to see the flow of your program and see if ur debug messages are printed on the screen. if not then probably your program is not even getting compiled after your changes. |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
Quote:
When you change one of your header files, every cpp file that includes that header file, directly or indirectly, must be recompiled to be made aware of the changes you've made in the header. But the only dependencies your makefile sees are that, if something.cpp changes, it must rebuild something.o. Try adding more dependencies in your makefile: Code:
something.o:include1.h include2.h include3.h someotherthing.o:include2.h somethingelse.o:include3.h # etc That way, when changes happen to the listed include files, it will know it has to rebuild those object files. |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems with find command | lodey | UNIX for Dummies Questions & Answers | 4 | 10-27-2007 07:47 AM |
| Problems with tar command | lo-lp-kl | AIX | 2 | 05-16-2007 02:19 AM |
| system command and threads problems | german83 | AIX | 2 | 04-21-2007 11:57 AM |
| CC command problems | jpeery | Programming | 1 | 08-02-2004 01:34 PM |
| Problems with expr command | rooh | UNIX for Dummies Questions & Answers | 2 | 01-17-2003 10:03 AM |
|
|