Silverfrost Forums

Welcome to our forums

Salford example on creating a dll

12 Jul 2006 6:34 #855

Hi,

I am trying to make use of a dll but do not find a good example where it is axplained in a step by step way. From the Salford FTN95 User's Guide I cannot obtain the desired results.

Question: Where can I find a complete example/tutorial on creating and implementing a dll using the Salford compiler and linker.

Thanks Jacques

12 Jul 2006 8:30 #857

Jacques

I don't think there is an example or a tutorial.

Working from Plato or Visual Studio you create a new project of type Fortran DLL. In the Project Properties->Linker Options->Linker Options, select 'Export all'.

To use the DLL, in Plato you must create a new project. In the Project Explorer window, create a Reference to the new DLL.

In Visual Studio you can create a new project within the same 'solution' as the DLL.

12 Jul 2006 12:11 #859

Hi Paul,

thanks. I have tried it and everthing seems to working. Having this done I have the following questions:

  1. Having a reference to the dll, is this direct or indirect.

  2. Do I still need to have the dll in the directory or is the resulting .exe independant of the dll.

  3. When compiling the dll, what is the meaning of the importing library. Is this an extra output besides the dll itself?

  4. Is there a possibilty to get an automatically generated summary of the functions in the dll?

12 Jul 2006 11:30 #861

Johannes

  1. I am not sure what you mean by direct and indirect. The reference is required by the linker at link time. SLINK has the ability to use the DLL for this purpose. Other linkers tend to use an import library which is a library of stubs sufficient for linking purposes.

  2. The exe needs to be able to 'see' the DLL. I could be in the same folder or in a folder that is accessed via the PATH environment variable. System DLLs are often placed in C:\WINDOWS\SYSTEM32 or its equivalent.

  3. SLINK normally uses the DLL as an import library. It can also use import libraries.

  4. If you just want a list of the function names then you could use the Microsoft dumpbin.exe. See also http://ems.calumet.purdue.edu/mcss/kraftrl/cs302/tools.html or search in Google for dumpbin.exe.

With the holiday period coming up I do not think that I will have time to look at your mk32 questions.

Please login to reply.