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 

Ideas on porting C++ component

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Ryan



Joined: 25 Feb 2016
Posts: 26

PostPosted: Fri Apr 07, 2017 3:23 pm    Post subject: Ideas on porting C++ component Reply with quote

We have a 32 bit app comprising of Fortran and C++ (GUI) that is compiled and then linked into a single executable using FTN95, SCC and SLINK.

We are trying to create a 64 bit release but the SCC compiler is unusable in 64 bit mode due to many bugs (it crashes when it tries to compile and reports errors plus some ‘not implemented’ messages).

This means that we must use the Microsoft Visual C++ compiler to compile the C++ aspect and try to merge the binaries into an executable later on.

FTN95 generates both 32 and 64 bit object files, however the 64 bit variants are not standard COFF object files and the Microsoft linker cannot consume them. SLINK64 cannot create static libraries either.

I think this leaves us with two options;

1) Output static libraries from the C++ code to be consumed by SLINK/SLINK64.
2) Compile the Fortran code to DLLs and link the C++ code with MS tools.

Both will involve a fair bit of effort to rework. My questions are;
a) Am I missing something here?
b) Are there any updates to SCC / SLINK64 in the near future that mean I should wait instead of embarking upon a rewrite?

Thanks in advance,

Ryan
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Apr 07, 2017 4:31 pm    Post subject: Reply with quote

Ryan

My preferred approach would be to create a Microsoft C++ DLL exporting extern "C" functions. Then link this to a Fortran project that uses C_EXTERNAL for the imported functions. SLINK64 will be able to load the 64 bit C++ DLL. It will also work for the 32 bit case using SLINK.
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 -> 64-bit 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