replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Calling the Wrong Version of ftn95 executable
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 

Calling the Wrong Version of ftn95 executable

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Thu Mar 05, 2015 6:23 pm    Post subject: Reply with quote

You will need to know the path (i.e. the folder) for each version of FTN95.
You will also need to know the current PATH environment variable and how to change it.

By default, the version of FTN95 that is used will be the one that occurs first in the list of folders that appear in the PATH environment variable.

Some of the details depend on which operating system you are running so try asking Google using this information. For example "How do I change the PATH environment variable under Windows 7".

When working from a command line in a "Command Prompt" window you can create and use a batch file to set the PATH. But editors like Visual Studio and Plato will compile etc using a background process (in effect its own temporary Command Prompt window) where (by default) the default PATH will be used. There are lots more caveats but hopefully you will get the drift.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri Mar 06, 2015 1:25 am    Post subject: Reply with quote

John,

You must have the 2 different versions installed in different directories. (I have at least 4 different versions which I can switch between, as well as other compilers.)

To switch, all you need to do is have a different .bat file for each version and ensure that you have the correct environment variables set (by activating this .bat file in your cmd.exe window.)

To overcome this problem, be aware of where each version is stored, especially where each version of salflibc.dll is stored.

Then review the default settings by using the command SET and see what environment variables default to and which are related to FTN95. You can then create your own "fvars.bat" file for each version (with a unique name) and then all should be ok.
I create an environment variable for the ftn95 directory I want to use, but you then must update the path.

My example minimal .bat file for win_7 is:
Code:

set ftn95_dir=C:\Program Files (x86)\Silverfrost\FTN95
f95include=%ftn95_dir%\include
mod_path=%ftn95_dir%\include
set path=%ftn95_dir%;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

(you can add extra paths into the path variable as you require. This can become a very long string!)

The next problem to be aware of is there is a default path ( as seen in "set path") and this is what will be used before you change it, ie this will select the version of salflibc.dll used by all your ftn95 compiled programs before you change the path.

You can change the default (for Win_7) by editing path in:
Control_Panel > System > Advanced system settings > advanced >Environment Variables.
select Path then edit ( You may want to copy the string to notepad to edit then paste the update back, as the edit box is a bit small ! Don't get this wrong. )

Once you understand the use of path, it becomes quite easy. Using new variable names in the bat file is a big help, such as ftn95_dir or gcc_dir all help.
Other compilers have much more complex .bat to select different versions, such as including the use of visual studio versions or 32/64 bit selection.
Fortunately FTN95 does not require the use of regedit, which is another level of complexity that removes a lot of the flexibility that is in the environment variable approach ( Plato does )

Also, double clicking a .bat file in windows explorer may not do any good, as when it closes, all it's settings are lost. You need to understand the "scope" of the .bat file settings.

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ 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