[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1236.0. "Fortran calling C" by ADCA01::KISHORI () Thu Mar 20 1997 01:05

    Hi,
    
    I'm in a UNIX to WNT 4.0 porting project. It is not a native port, we
    are using NutCracker on NT to simulate UNIX environment. The source
    contains both Fortran and C files. In some of the Fortran files, C
    subroutines and functions are called. When we compile on NT we get a
    series of unresolved external symbols for these subprograms.
    
    I used the compiler directive
    cDEC$ ATTRIBUTES C::<funcname> in the Fortran program which calls C
    functions. The no. of unresolveds get reduced but they are still there.
    
    Has anybody encountered similar problems ? We are using Visual Fortran
    90. 
    
    Kishori
    
                                                                    
T.RTitleUserPersonal
Name
DateLines
1236.1Example?WIBBIN::NOYCEPulling weeds, pickin&#039; stonesThu Mar 20 1997 07:553
Can you show us a small example that produces an unresolved symbol warning?
Show the FORTRAN code that makes the call, and the C routine that it should
resolve to.
1236.2include declarations tooTLE::WHITLOCKStan WhitlockMon Mar 24 1997 11:153
Also please show us all the declarations for the routines getting called.

Thanks			/Stan
1236.3Used Compiler directivesADCA01::KISHORITue Apr 22 1997 01:3912
    Hi,
    
    Sorry for the delay in replying, actually we were able to solve the
    unresolveds by using the compiler directives /assume:underscore and
    /name:lower. This is because Fortran on NT interprets routine names in
    uppercase and we want it append underscore to the routinje names.
    
    But the funniest thing is I'm getting unresolveds in DFOR.LIB. To which
    other libraries do I have to link to.
    
    Thanks
    Kishori
1236.4more info pleaseTLE::KARAMTue Apr 22 1997 09:457
Based on the information provided thus far, it isn't possible to
answer your question.  What are the unresolved entries that
you are getting from dfor.lib?  are you doing the link by hand,
using the DVF driver (DF), using the Developer studio or the
C/C++ driver to perform the link?

thanks - peter