Welcome, Guest
Username: Password: Remember me
General Purpose Components and Libraries, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Duplicate unit UniqueInstanceRaw 8 years 6 months ago #9697

  • Avra
  • Avra's Avatar Topic Author
  • Visitor
  • Visitor
If I add pl_luicontrols to Project Inspector and put UniqueInstance component on my form, if I want raw check for another application instance at the very beginning of LPR file by testing for InstanceRunning like this:
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.

Last edit: by Avra.

Duplicate unit UniqueInstanceRaw 8 years 6 months ago #9698

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Sir
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.

Last edit: by Sternas Stefanos.

Duplicate unit UniqueInstanceRaw 8 years 6 months ago #9709

  • Avra
  • Avra's Avatar Topic Author
  • Visitor
  • Visitor

Sternas Stefanos wrote: Sir
Did you have in your project options the path of pl_LuiControls ?

No (see Lui1 screenshot). I have added pl_LuiControls to ProjectInspector (Lui2 screenshot).

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.

I did as you can see in Lui3 screenshot, but then InstanceRunning from "uniquesinstanceraw.pas" is not found and compiler errors.

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.

This shouldn't be needed if I have added a package, right?

You can’t use both methods at the same time

I think I didn't. Look at Lui3 and Lui4 screnshots.

My suggestion is to use the first one.
and delete or clear old “ppu” files from your project out directory

That was what I originally did, but I get error in Lui3 screenshot.

Please always use the latest CT version Stable 5.70 or LAB 5.80

Everything mentioned is running on latest CT LAB 5.80 on WinXP SP3.

Please Log in or Create an account to join the conversation.

Last edit: by Avra.
  • Page:
  • 1