replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - EXPORTALL for .net dll in Visual Studio 2008?
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 

EXPORTALL for .net dll in Visual Studio 2008?

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



Joined: 14 May 2009
Posts: 29

PostPosted: Tue Mar 02, 2010 11:40 pm    Post subject: EXPORTALL for .net dll in Visual Studio 2008? Reply with quote

I have been able to create and use a "Win32" dll with EXPORTALL set in Project-->Properties-->Linker Options.

However, how I do not see how to do that with a .NET dll project. How do I set EXPORTALL for a .NET dll in Visual Studio?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Mar 03, 2010 8:59 am    Post subject: Reply with quote

Everything is exported anyway. There is no switch because the attribute cannot be switched off.

If you were writing C# code then you could make your fucntions private or public. In .NET FTN95 all external routines are public
Back to top
View user's profile Send private message AIM Address
silverdan



Joined: 14 May 2009
Posts: 29

PostPosted: Wed Mar 03, 2010 4:07 pm    Post subject: Reply with quote

Well, unfortunately I must be missing something, I am not getting anything exportable. When I run the vb.net code calling the .NET FTN95 dll it gives the following error message when accessing the Fortran function:

"EntryPointNotFoundException was unhandled"

I am using the same code from the help file. Again, it worked for the Win32 dll, but not for .NET FTN95 dll

When I use the trial version of "Anywhere PE Viewer" it shows the following:

C:\WINDOWS\F95Net.dll
The image does not export any functions

For the Win32 dll it shows the following:
C:\WINDOWS\F95.dll
Export table
F (Ordinal: 1, Entry Point RVA: 1000h (4,096))

Here is the Fortran code used in both:

Code:

F_STDCALL FUNCTION F(X)
INTEGER F,X
F=X
END


and here is the vb.net code

Code:

Public Class Form1
    Private Declare Function F Lib "F95Net.dll" (ByRef lnr As Integer) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x As Integer

        x = F(3)
        TextBox1.Text = CStr(x)

    End Sub
End Class


Here is the buildlog.txt output, I tired for both .NET 2.0 and 3.5:

/////////////////////////////////////

Build log for project: F95Net
Configuration: Debug/.NET
Date: 3/3/2010 - 09:49:13

/////////////////////////////////////

System Configuration
////////////////////

Path Directories:
C:\Program Files\Silverfrost\FTN95
C:\Program Files\Pervasive Software\PSQL\binC:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\MSDEV\BIN
C:\Program Files\PerforceC:\Program Files\jZip
C:\Program Files\Intel\WiFi\binC:\Program Files\IDM Computer Solutions\UltraEdit-32
C:\Program Files\Windows ImagingC:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
C:\Program Files\Microsoft Visual Studio\Common\Tools
C:\Program Files\Microsoft Visual Studio\VC98\bin

Project Directory: C:\F95Net\F95NetOutput Directory: C:\F95Net\F95Net\Debug\NET
Output File: Debug\NET\F95Net.dll

Project Build
/////////////

C:\F95Net\F95Net\FreeFormat1.f95

Compiling...

Compiling file: FreeFormat1.f95
FTN95.EXE "C:\F95Net\F95Net\FreeFormat1.f95" /NO_BANNER /DEBUG /FULL_DEBUG /STANDARD_ERROR_REPORTS /SINGLE_THREADED /FPP /CLR /CLR_VER 2 /REF "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /REF "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /REF "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll" /VS8 /DELETE_OBJ_ON_ERROR /ERROR_NUMBERS /UNLIMITED_ERRORS /BINARY "Debug\NET\FreeFormat1.dbk"

Linking...

Command line for link:
dbk_link2.exe /VS7 /NO_BANNER /REF:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll";"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll";"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll" "Debug\NET\F95Net.dll" @"C:\F95Net\F95Net\link.lst"
Linker output:
Assembly file Debug\NET\F95Net.dll for .NET 2.0 produced

F95Net build succeeded.

/////////////////////////////////////
Back to top
View user's profile Send private message
silverdan



Joined: 14 May 2009
Posts: 29

PostPosted: Thu Mar 04, 2010 1:08 am    Post subject: Reply with quote

Ok, I found the solution in the help file. Wow, it was really hidden under Visual ClearWin-->Getting Started. There you will find a link to a BEAUTIFUL sample called "Calling Fortran from .NET - A Simple C# Form".

It should really be called "Calling FTN95 .NET dll from .NET - A Simple C# Form"

Anyway, this is perfect, and should be easier to find.
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 -> 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