Once I get the Fortran into a library of some sort which is callable by the C from Visual Studio, the Fortran can pretty much just be left alone as a pre-built library. (What I'd actually rather do, once I get past this part, is get it to work with Visual Studio 13, since I have a C project being built with CMake (written mostly by someone else to whom I have limited access for questions and aid) from which I want to be able to call my Fortran. Question: How do I get this example code to build/compile/run given the constraints I've listed? So I can't figure out how to actually make it, assuming I'm even doing the CMake part right. If I hit Ctrl C, it kills it and returns to the normal MSYS2 prompt. If I type stuff like make it seems to run it again and it just brings up the prompt again, within the prompt. All rights reserved.Ĭ:\users\myself\desktop\dll_test\with_fortran_cmake\build> I try running make in the MSYS2 shell, and I get this: MSYS /c/users/myself/desktop/dll_test/with_fortran_cmake/buildĬopyright (c) 2009 Microsoft Corporation. In my build directory there is then a Makefile and a number of other files and directories. Then I click Configure again and get: Configuring done Then I pop open the CMake-GUI, load in the CMakeLists above, hit Configure, specify the generator for the project to be "MinGW Makefiles", select "Use default native compilers", and get the following output: The Fortran compiler identification is GNU 5.4.0Ĭheck for working Fortran compiler: C:/msys64/mingw64/bin/gfortran.exeĬheck for working Fortran compiler: C:/msys64/mingw64/bin/gfortran.exe - worksĭetecting Fortran compiler ABI info - doneĬhecking whether C:/msys64/mingw64/bin/gfortran.exe supports Fortran 90Ĭhecking whether C:/msys64/mingw64/bin/gfortran.exe supports Fortran 90 - yes (I've also tried C:\msys64\usr\bin, but it complains about sh.exe being in the same directory, among other issues.) I've got my Windows Path appended with C:\msys64\mingw64\bin. when I compile it with my own Makefile in the MSYS2 shell, it compiles.) I've got the MSYS2 version of MinGW, since that's the only version that the code I'm eventually going to be compiling will compile with on Windows. This is what I've been working with so far:ĬMakeLists.txt: project(cmake_test Fortran) But all three together seem to be almost non-existent.Īll I want to do (at this point) is get a simple Fortran program built and compiling using CMake on Windows, using MinGW's gfortran compiler. A lot of stuff exists online with regards to CMake, Fortran, and MinGW, and even combinations of two at a time. I've scoured the interwebs and even borrowed the ' Mastering CMake' book from a friend, but I'm still having the hardest time. Our technology allows developers to locally edit Fortran, compile source code using our hosted, modern Fortran compiler, and run the resulting executable directly in their web browsers! Whether you are working from a phone, tablet, or desktop computer, Fortran code can be executed in the browser and results can be downloaded to your local device.I've got much more I've got to get figured out with CMake than just the following problem, but it's the first and simplest one which I still can't get past. WebFortran is a new way to work with the Fortran programming language from any device. The Simple Way to Code in Fortran Anywhere
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |