Implication of project dependencies
From: Aurélien REGAT-BARREL (nospam-aregatba_at_yahoo.fr.invalid)
Date: 01/03/05
- Next message: Herb: "Properties Window not displaying"
- Previous message: OrbitalTug: "RE: Everything disabled in Toolbox"
- Next in thread: Aurélien REGAT-BARREL: "Re: Implication of project dependencies"
- Reply: Aurélien REGAT-BARREL: "Re: Implication of project dependencies"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 3 Jan 2005 11:22:27 +0100
Hi,
Happy new year everybody.
Sorry for crossposting, but I don't know which is the best : vc.ide_general
or vsnet.ide ?
I am working on a project with VC++ 2003 and it compile & link well, but I
have a strange problem. I have a singleton class with the following static
function:
myclass & myclass::GetInstance()
{
static myclass m;
return m;
}
This class is compiled as a static lib and used by an other project "main"
in the same solution.
My problem is that the static keyword seems to be ignored by the compiler.
Each time I call GetInstance(), a new object is created (the constructor of
m is called). It used to work, and the only change I found which seems to be
responsible of that are the project dependencies. Before, I used to manually
add the static lib myclass.lib in the link tab of my project. Now I removed
this manual reference and checked the project myclass in the project
dependencies of my "main" project, and I have this problem.
I don't understand what is wrong.
Thanks for your help.
-- Aurélien REGAT-BARREL
- Next message: Herb: "Properties Window not displaying"
- Previous message: OrbitalTug: "RE: Everything disabled in Toolbox"
- Next in thread: Aurélien REGAT-BARREL: "Re: Implication of project dependencies"
- Reply: Aurélien REGAT-BARREL: "Re: Implication of project dependencies"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|