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 

Search found 45 matches
forums.silverfrost.com Forum Index
Author Message
  Topic: How to load a Fortran function from C++ (instructions)
StamK

Replies: 6
Views: 161

PostForum: 64-bit   Posted: Wed Jun 21, 2017 4:59 pm   Subject:
I had tried that lib.exe command and it didn't work at first, but I found out that Qt was failing for another reason.

I can confirm that Qt can access the DLL with the LIB file created that way.
...
  Topic: How to load a Fortran function from C++ (instructions)
StamK

Replies: 6
Views: 161

PostForum: 64-bit   Posted: Tue Jun 20, 2017 1:13 pm   Subject:
Hi Paul, thanks for the useful input - but this is for Fortran calling a C++ DLL, while I have described a C++ executable loading a Fortran DLL.
  Topic: How to load a Fortran function from C++ (instructions)
StamK

Replies: 6
Views: 161

PostForum: 64-bit   Posted: Tue Jun 20, 2017 11:35 am   Subject:
If passing a string from C++ to Fortran, be aware that you need to add in C++ the string size (strlen) as an extra int parameter at the end (as per Silverfrost's documentation).

In VC++ this works ...
  Topic: How to load a Fortran function from C++ (instructions)
StamK

Replies: 6
Views: 161

PostForum: 64-bit   Posted: Tue Jun 20, 2017 11:31 am   Subject:
If using Qt with MSVC, then it is possible to use LoadLibraryA as above, or use Qt's QLibrary.


#include <QLibrary>

void QW_GET_VALC(int* IWIN, int* IFLD, char* CH)
{
t ...
  Topic: How to load a Fortran function from C++ (instructions)
StamK

Replies: 6
Views: 161

PostForum: 64-bit   Posted: Tue Jun 20, 2017 11:28 am   Subject: How to load a Fortran function from C++ (instructions)
In the 32bit world it was possible for the linker to create a dll AND a lib file (via the archive command).
This was particular useful as it allowed a Qt or VC++ program to call a Fortran function d ...
  Topic: attempt_rlo_load and record_profile_address spurious warning
StamK

Replies: 4
Views: 128

PostForum: 64-bit   Posted: Mon Jun 19, 2017 4:08 pm   Subject:
I can confirm that with the n.12 DLL release the warnings disappear (from my first post).
  Topic: Bug with <iostream.h> in 64bit
StamK

Replies: 1
Views: 100

PostForum: 64-bit   Posted: Mon Jun 19, 2017 4:04 pm   Subject: Bug with <iostream.h> in 64bit
The following code compiles fine under 32 bit SCC but under 64bit it fails


[Silverfrost SCC/WIN32 Ver 3.88 Copyright (c) Silverfrost Ltd 2017]
3/0257 inline int ios::s ...
  Topic: attempt_rlo_load and record_profile_address spurious warning
StamK

Replies: 4
Views: 128

PostForum: 64-bit   Posted: Mon Jun 19, 2017 2:37 pm   Subject:
Forget about my latest post, it was a path issue...
Sorry!
  Topic: attempt_rlo_load and record_profile_address spurious warning
StamK

Replies: 4
Views: 128

PostForum: 64-bit   Posted: Mon Jun 19, 2017 2:02 pm   Subject:
Thanks Paul.
Normally I am using Qt to call the Fortran DLLs so no issue there, however when using a Silverfrost executable (either via ftn95 or scc) that calls the DLL then it will stop with an erro ...
  Topic: attempt_rlo_load and record_profile_address spurious warning
StamK

Replies: 4
Views: 128

PostForum: 64-bit   Posted: Sun Jun 18, 2017 4:39 pm   Subject: attempt_rlo_load and record_profile_address spurious warning
When linking any subroutine file(s) (even a basic one) into a DLL, I am always getting the following warnings. To be noted, this is with the latest slink64.exe I was kindly given by Paul.


Loadin ...
  Topic: Allocatable character strings
StamK

Replies: 1
Views: 109

PostForum: 64-bit   Posted: Wed Jun 14, 2017 1:36 pm   Subject: Allocatable character strings
The following program (about allocatable character strings) works fine under Gfortran, but in Silverfrost it complains about " Colon found where not expected".


PROGRAM test

IMPLICIT ...
  Topic: Bug with /UNDEF and global variables via COMMON in a DLL...
StamK

Replies: 18
Views: 1724

PostForum: 64-bit   Posted: Tue Jun 13, 2017 5:01 pm   Subject:
I can confirm this is fixed. Great job!
  Topic: Cannot use scroll bar in large files in debugger
StamK

Replies: 0
Views: 130

PostForum: 64-bit   Posted: Sun Jun 11, 2017 10:12 am   Subject: Cannot use scroll bar in large files in debugger
In large files (4700+ lines), the control of the scroll bar disappears, as you can see in the picture. Using up/down keys does not scroll either. This means that during debugging I cannot see what is ...
  Topic: Strange warning...
StamK

Replies: 4
Views: 197

PostForum: 64-bit   Posted: Wed Jun 07, 2017 3:35 pm   Subject:
The RESULT(C_STRING) specifies the return.
  Topic: Strange warning...
StamK

Replies: 4
Views: 197

PostForum: 64-bit   Posted: Wed Jun 07, 2017 2:10 pm   Subject: Strange warning...
The following code works fine in 32bit, but in 64bit it gives a strange warning (shown below). If the function is outside a module, then the warning disappears.


MODULE TEST
CONTAINS
FUNCTION F_ ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT + 1 Hour
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group