This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking gfortran output in Visual Studio


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++.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]