PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Britta Doerre on March 04, 2010, 05:24:46 AM

Title: Main Project Folder and Include File Path
Post by: Britta Doerre on March 04, 2010, 05:24:46 AM
"UEdit" is the project folder of a new DLL project.
It's absolute Path is:
C:\Dokumente und Einstellungen\bdoerre\Eigene Dateien\Projekte\MechaniCAD SDK\PB_MCADD_ADDON\UEdit\
It currently contains the file:  UEdit.pd2
PB_MCADD_ADDON (see path above) is the projects folder for all the other projects like UEdit.
PB_MCADD_ADDON contains also all include files and other common files for all projects.
In Firefly 3 "Project Properties" i can find an entry field for the one an only "Main Project Folder".
I guess that this folder is to be assigned the whole path obove: C:\....\UEdit\, ending with the project folder.
When i try to add some additional includes to FF_AppStart now, i'm shure i have to use the path PB_MCADD_ADDON. But when i try the relative path syntax #Include "..\mcApiTool.inc" at this place, the include file is not found.
Only when i enter the absolute path of each include file i get no error:
#INCLUDE "C:\Dokumente und Einstellungen\bdoerre\Eigene Dateien\Projekte\MechaniCAD SDK\PB_MCADD_ADDON\mcApiTool.inc"
The "Main Project Folder" cannot be used relatively to assign include files.
Could this be by design?


Title: Re: Main Project Folder and Include File Path
Post by: Paul Squires on March 04, 2010, 08:45:19 AM
Hi,

When code is generated for a FireFly project, it is created in the "Release" folder. Therefore, when you are constructing your relative paths you need to be aware that the folders will be relative to the "Release" folder.

For example, say you have a project folder set up like this:

c:\ff3\projects\paul
c:\ff3\projects\paul\forms
c:\ff3\projects\paul\images
c:\ff3\projects\paul\modules
c:\ff3\projects\paul\release

If you put your includes in the "modules" folder then the relative path would be:
..\modules\myinclude.inc

If I am reading your post correctly, your project is in "uedit" so your codegen files will be generated in "uedit\release". Therefore, if you are trying to reference include files in the PB_MCADD_ADDON folder then you would do it like this:
"..\..\mcApiTool.inc"