Giter Site home page Giter Site logo

fortlua's Introduction

  • Stochastic processes for epidemiology
  • Computational demography
  • Distributed, parallel, high-performance computing
  • Provenance systems

fortlua's People

Contributors

kmanalo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fortlua's Issues

How to compile with MSVC & Intel Fortran on Windows?

I've been able to build Lua as a standalone executable with MSVC on Windows and create static and dynamic libraries using the LIB.EXE tool (Lua 5.3.2 sources taken from the Aotus project and the build process was modified from http://blog.spreendigital.de/2015/01/16/how-to-compile-lua-5-3-0-for-windows/). I've been able to compile the Fortran code with ifort on Windows but problem comes in when I try to link the Fortran .obj files with the C .lib files.

Running

ifort /I..\lua-5.3.2\src config.f90 program.f90 ..\lua-5.3.2\src\lua5.3.2-static.lib /exe:fortlua_test.exe

gives the fairly common error:

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

and barfs up a lot of errors regarding multiply- and never- defined symbols.

The problem seems to be with the options passed through to the linker as well as with the way the C libraries were originally built/packaged. I've successfully built Aotus on both Linux and Windows with gcc & gfortran and on Linux with ifort and gcc, but I cannot make any headway with MSVC and ifort on Windows, either with Aotus or FortLua. I switched my attention from Aotus to FortLua because FortLua is much simpler; if the Windows linking issues could be solved for FortLua, the same solution should be applicable for Aotus as well.

I have no guarantee my Lua libs were properly built for library use or packaged properly; I'm neither a C developer nor a Windows developer so please take that into account. A lot of the build process is cargo-cultish, modifying other people's work until it stops throwing errors but without understanding the underlying gratuitous Byzantine complexity of the Microsoft ecosystem (Linux is slightly less bad, but I can at least make the tools work on my own. Eventually.)

Anyway, could you assist in helping build FortLua on Windows with ifort and MSVC? I have access to a licensed version of Windows ifort at work; MSVC can be obtained from MS via their Visual Studio Express downloads (though don't ask me what the difference between VS2010, VS2013, etc. is; apparently the specific version can make a big difference but nobody can clearly explain why one should choose one over another. As I said, gratuitous Byzantine complexity...)

I'm in the process of writing up a substantial article (blog post, etc) on integrating Lua and Fortran and the last missing piece is getting Lua & Fortran working together on Windows using the standard commercial toolchain. Any help you could provide would be very greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.