Jump to content

Sharing Pascal modules from a common library directory


Recommended Posts

1. Created a console project.

2. Added a new module to the Unit1 uses list (uses Test;)

3. Compiled. 'Project was not saved yet. Do you want to save it first ?

Saved in C:\Apples\Test5

Syntax Error: Unit "TEST" referenced in "Unit1" not found[line:8,column:10,file:Unit1]

4. In Project Manager, selected the project Test5 and the +pas button, "Add a pre existing external source file to the project".

Added a pascal source to the project C:\temp\Test.pas.

Smart Pascal => "External files must reside within the project folder: C:\Apples\Test5,OK

5. Compiled. Pop Up Error "Unit Test could not be located"

but produced the syntax error,

"Syntax Error: Unknown name "T_DateAndTime" [line:117,column:74,file:Test], which indicates that it did add it to the project.

 

How can Smart Pascal projects share Pascal modules that reside

in a common library directory which is outside those projects ?

Link to post
Share on other sites

This is something we addressed recently in v2.1. However, while this is now technically possible, I'm not sure if this new feature is accessible from the IDE. Eventually you must add it as local file and manipulate the .sproj file in a text editor. Since it is pure XML, you should easily be able to find where the file is referenced. Since v2.1 it accepts absolute paths, which allows what you aim for.

 

While we already have this on our agenda (for v2.2), it would be nice if you could share your results (whether this works or not). This way others get an idea as well.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...