CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Linking to fortran compiler in Windows

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2014, 03:23
Default Linking to fortran compiler in Windows
  #1
New Member
 
Leanne R.
Join Date: Sep 2012
Posts: 2
Rep Power: 0
matth301 is on a distinguished road
I am running Fluent 15.0 on Windows 7 64 bit. I am trying to compile a UDF that references some Fortran subroutines. I have compiled the subroutines into a static library file, libmc.a. However, when I run nmake to compile the full UDF library, I get the following error:

Quote:
Creating library libudf.lib and object libudf.exp
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol ___chkstk
_ms referenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol _gfortran
_st_write referenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol _gfortran
_transfer_real_write referenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol _gfortran
_st_write_done referenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol _gfortran
_transfer_character_write referenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol lround re
ferenced in function co2_reac_beamup_
libmc.a(co2_reac_beamup.o) : error LNK2019: unresolved external symbol _gfortran
_transfer_integer_write referenced in function co2_reac_beamup_
libmc.a(randdp.o) : error LNK2019: unresolved external symbol trunc referenced i
n function __randdp_MOD_sdprnd
libudf.dll : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\x86_amd64\link.EXE"' : return code '0x460'
When I have encountered similar errors on Linux, the solution was reference the Fortran compiler in the Makefile:

Code:
    $(LD) $(LDFLAGS) $(OBJECTS) $(USER_OBJECTS) -L/soft/gcc/4.7.2/lib64 -lgfortran -o $@
Does anyone know how to fix this error in Windows? I don't see a linking line in the Fluent UDF makefile for Windows. Thanks for any suggestions!
matth301 is offline   Reply With Quote

Reply

Tags
fortran subroutines, udf compilation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel Fortran Compiler & Tutorial 17 Young CFX 1 March 30, 2011 02:39
Fortran Compiler and example Young CFX 1 March 22, 2011 23:26
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Fortran compiler Erik Siemens 2 November 28, 2008 21:05
OpenFOAM with Cygwin kitchener OpenFOAM Installation 6 April 25, 2006 00:09


All times are GMT -4. The time now is 01:08.