Linking gfortran output in Visual Studio

Tim Prince timothyprince@sbcglobal.net
Wed Apr 19 01:16:00 GMT 2006


John Weeks wrote:
> Thanks, Steve.
>
>   
>> Without knowing what the new missing symbols are, it is
>> difficult to give any guidance.  You could be missing
>> several libraries.
>>     
>
> libgfortran.lib(error.o) : error LNK2019: unresolved external symbol
> ___umoddi3 referenced in function __gfortrani_gfc_itoa
> libgfortran.lib(error.o) : error LNK2019: unresolved external symbol
> ___udivdi3 referenced in function __gfortrani_gfc_itoa
> libgfortran.lib(read.o) : error LNK2019: unresolved external symbol
> ___udivdi3 referenced in function __gfortrani_read_f
> libgfortran.lib(error.o) : error LNK2019: unresolved external symbol
> __alloca referenced in function __gfortrani_st_printf
> libgfortran.lib(open.o) : error LNK2019: unresolved external symbol
> __alloca referenced in function __gfortrani_new_unit
> libgfortran.lib(list_read.o) : error LNK2001: unresolved external symbol
> __alloca
> libgfortran.lib(list_read.o) : error LNK2019: unresolved external symbol
> ___divdi3 referenced in function _convert_integer
>
>
>
> As I look at the list, things like alloca stand out... that suggests libgcc
> is required. But my application already links the Windows memory allocation
> routines, and it seems like it would be dangerous to mix that with gcc
> alloca.
>
> Perhaps gfortran just isn't designed to work with VC++ and the Microsoft
> libraries.
>
>   
Yes, generally it's best to avoid most references to run-time library, 
when  calling  fortran from an incompatible brand of C++.



More information about the Fortran mailing list