- Forum
- CodeTyphon Studio
- CodeTyphon Studio Components and Libraries
- General Purpose
- Duplicate unit UniqueInstanceRaw
Question Duplicate unit UniqueInstanceRaw
- Avra
- Topic Author
- Visitor
-
if InstanceRunning then // described at http://wiki.freepascal.org/UniqueInstance#How_To_Use_.28Raw.29
Exit;
then I am forced to use unit uniqueinstanceraw like this (adding pl_luicontrols package was not enough to recognize InstanceRunning):
uses
uniqueinstanceraw in 'c:\codetyphon\typhon\components\pl_LuiControls\source\uniqueinstance\uniqueinstanceraw.pas';
After that IDE gives me these hints:
Messages, Hints: 2
Note: Duplicate unit "uniqueinstanceraw" in "pl_luicontrols 5.5.2", source="C:\codetyphon\typhon\components\pl_LuiControls\source\uniqueinstance\uniqueinstanceraw.pas"
Note: Duplicate unit "uniqueinstanceraw" in "L1toOracle", orphaned ppu "M:\Lazarus Projects\L1toOracle\lib\i386-win32\uniqueinstanceraw.ppu"
What needs to be done to solve this duplicate unit problem?
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
Did you have in your project options the path of pl_LuiControls ?
1) You can declare in your project, pl_LuiControls as need package,
In this case the CT-FPC use “ppu” from pl_LuiControls/lib/ directory.
2) You can add in your “project options” the path for pl_LuiControls
in this case the CT-FPC will build pl_LuiControls ppu in your project “ppu” out path.
You can’t use both methods at the same time,
because the CT-FPC compiler found in project paths the same ppu 2 times...
it's logical

My suggestion is to use the first one.
and delete or clear old “ppu” files from your project out directory
PS: Please always use the latest CT version Stable 5.70 or LAB 5.80
PilotLogic Architect and Core Programmer
Please Log in or Create an account to join the conversation.
- Avra
- Topic Author
- Visitor
-
No (see Lui1 screenshot). I have added pl_LuiControls to ProjectInspector (Lui2 screenshot).Sternas Stefanos wrote: Sir
Did you have in your project options the path of pl_LuiControls ?
I did as you can see in Lui3 screenshot, but then InstanceRunning from "uniquesinstanceraw.pas" is not found and compiler errors.1) You can declare in your project, pl_LuiControls as need package,
In this case the CT-FPC use “ppu” from pl_LuiControls/lib/ directory.
This shouldn't be needed if I have added a package, right?2) You can add in your “project options” the path for pl_LuiControls
in this case the CT-FPC will build pl_LuiControls ppu in your project “ppu” out path.
I think I didn't. Look at Lui3 and Lui4 screnshots.You can’t use both methods at the same time
That was what I originally did, but I get error in Lui3 screenshot.My suggestion is to use the first one.
and delete or clear old “ppu” files from your project out directory
Everything mentioned is running on latest CT LAB 5.80 on WinXP SP3.Please always use the latest CT version Stable 5.70 or LAB 5.80
Attachments:
Please Log in or Create an account to join the conversation.