forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using build macros in .ftn95p projects

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Sterren



Joined: 08 Jul 2014
Posts: 6

PostPosted: Wed Jul 23, 2014 4:01 pm    Post subject: Using build macros in .ftn95p projects Reply with quote

Hi,

I have FTN95 projects which reference the outputs of other projects during linking. When I add a reference in the solution explorer under the project, the hard coded path is put in the .ftn95p, like this;

Code:

"References"
{
    "D:\\Code\\Developer Sandbox\\SATURN\\GLib\\Debug\\Win32\\GLib.lib"
    {
    "CopyLocal" = "T"
    "ProjectRef" = "{00BD355F-B7A3-4F88-AEDA-9699F2F5550A}|GLib\\GLib.ftn95p"
    "IsProject" = "T"
    "IsSTDCALL" = ""
    "ExcludeFromBuild" = ""
    "ReferenceName" = "D:\\Code\\Developer Sandbox\\SATURN\\GLib\\Debug\\Win32\\GLib.lib"
    "ReferencePath" = "D:\\Code\\Developer Sandbox\\SATURN\\GLib\\Debug\\Win32\\GLib.lib"
    }


However, this is not maintainable as this code is checked into source control. Other developers do not necessary have the same workspace mappings as I do. Also, the exact path changes depending on the build (i.e. debug or release). In C# (.csproj) projects, you would use build macros as described here: http://msdn.microsoft.com/en-us/library/c02as0cs.aspx. Unfortunately the following does not work;

Code:

"References"
{
    "$(SolutionDir)GLib\\$(Configuration)\\$(Platform)\\GLib.lib"
    {
    "CopyLocal" = "T"
    "ProjectRef" = "{AA0B4B19-90CE-4BA3-A271-77402EF8EAEA}|GLib\\GLib.ftn95p"
    "IsProject" = "T"
    "IsSTDCALL" = ""
    "ExcludeFromBuild" = ""
    "ReferenceName" = "$(SolutionDir)GLib\\$(Configuration)\\$(Platform)\\GLib.lib"
    "ReferencePath" = "$(SolutionDir)GLib\\$(Configuration)\\$(Platform)\\GLib.lib"
    }


How would I generalise this so that hard coded paths are not used?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Sat Jul 26, 2014 12:31 pm    Post subject: Reply with quote

If you are using Plato then there is an option to "Use relative path for project files". See Tools menu under Options->Environment->General.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group