473,385 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

compilation dependencies ..

I've a singleton object declaration in C++ in which there are other
classes' POINTERS declared as private members as shown below.

// CSingleton.h

Class Singleton
{

private:
CObject1 *obj1; // defined inCObject1.h
CObject2 *obj2; // defined in CObject2.h
Cobject3 *obj3; // defined in CObject3.h
}
I'm on a HP-UX, and in one of the cpp files the Singleton object is
created(CSingleton.h). If one of the objects viz., CObject ; CObject2
;
CObject3 changes (ie., a change in the header)will i have to recompile
the cpp file.?? As of now, I recompile the cpp before execution.
Incase if I choose not to recompile the cpp file, will it cause any
future errors which might go undetected during compilation??

Regards
Anand
Jul 19 '05 #1
1 1626
"Anand" <an************@yahoo.co.uk> wrote...
I've a singleton object declaration
....you mean "definition"...
in C++ in which there are other
classes' POINTERS declared as private members as shown below.

// CSingleton.h

Class Singleton
{

private:
CObject1 *obj1; // defined inCObject1.h
CObject2 *obj2; // defined in CObject2.h
Cobject3 *obj3; // defined in CObject3.h
} ;
I'm on a HP-UX, and in one of the cpp files the Singleton object is
created(CSingleton.h).
One of the cpp files is an .h file? I am not sure I understand.
If one of the objects viz., CObject ; CObject2
;
CObject3 changes (ie., a change in the header)will i have to recompile
the cpp file.??
It depends on whether you use the CObject3 class in it or not.
Usually, if 'obj3' is obtained from 'new' (that is, CObject3
is instantiated), you will need to recompile. If you obtain
your 'obj3' pointer from other function, there may not be a need
to recompile.
As of now, I recompile the cpp before execution.
That's a safe approach.
Incase if I choose not to recompile the cpp file, will it cause any
future errors which might go undetected during compilation??


It is impossible to tell. My crystal ball is not working today.

Victor
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Michael Gaab | last post by:
Compilation in c generally has four phases 1. Preprocessing 2. Compilation 3. Assembly 4. Linking. If I use a flag that will not link the code, order of compilation is not an issue,...
0
by: Sin | last post by:
> Xxxxx : error PRJ0008 : Could not delete file 'd:\xxxxxxx.dll'. > Make sure that the file is not open by another process and is not write-protected. > > LINK : fatal error LNK1168: cannot open...
2
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies...
7
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time...
3
by: Jens Müller | last post by:
I have a file here with several enums: #ifndef PLANARSEP_OPTIMIZE_H #define PLANARSEP_OPTIMIZE_H enum fund_cycle_behavior_t {PASS_MODE_FIRST, PASS_MODE_BEST, PASS_MODE_ALL};
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
10
by: Joris Dolderer | last post by:
Hello, I want to compile and link a program statically against the dietlibc. Of course, the dietlibc includes functions my program never needs. Is there any way to throw them out of the final...
4
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I removed my VS 2008 beta installation and reinstalled the final version that was released in November. However, my ajax-enabled application gives the following error message on compilation. ...
4
by: pjr | last post by:
Hi.. I am trying to compile a set of code using aCC 3.52(HP-UX 11.00) and visibroker 3.3. I am running into following error. I appreciate any ideas that can help me resolve this error. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.