![]() ![]() To do so, select all lib files from C:\gtk-build\gtk\圆4\release\lib and add them to your Source Files folder in your Fortran Application. Now, one needs to add the GTK4 static library files generated with gvsbuild (remember?) in the Application. As both projects are in the same Solution this should be your only option. Make sure that your Application depends on the gtk-fortran Static Library. In order to make them communicate, right-click on your Application project in Visual Studio and select Build dependencies>Project dependencies. You should now have two projects in the same Solution (one Static Library with gtk-fortran files and one Application with nothing inside). Once created, add the previously discussed Static library gtk-fortran project to the Solution. Now, create a new Fortran Application in Visual Studio. If everything went as expected, you should have no warning from Visual Studio. ![]() Then click Build > Build Solution to compile gtk-fortran. Once the project is created, add all the files from the gtk-fortran src folder in the Source Files folder from your newly created Fortran project. The first step is to create a Fortran Static Library project in Visual Studio in order to compile the gtk-fortran source files. gtk-fortran will act as the ice-breaker.ĥ Visual Studio solution setup in order to use GTK 4 and gtk-fortran Great news, but no practical interest yet as both cannot communicate together. Ok so now we have the Fortran IDE and compiler but also GTK4. But we will come back to this point later. Once the compilation is over you should find a new folder C:\gtk-build\gtk\圆4\release\lib\ containing the precious libraries that will be called by gtk-fortran once installed! Some important DLL were also created at C:\gtk-build\gtk\圆4\release\bin. The GTK code compilation should occur for the next ten minutes at least. You should have a “build.py” file in this folder. Then open a command prompt and navigate to the unzipped folder. Click on the green “Code” button at the top of the page and “Download zip”. To perform GTK 4 installation we will use gvsbuild (repo is here. In case of trouble with this last step just take a look here. Once the installation is done, add the Python installation path to your system’s PATH variables. Select where you want Python to be installed and remember this location. Regarding the Python download and install, just follow the instructions here. Now is the time to talk about GUI… but first Python if it is not already installed. ![]() The Visual Studio solution described in this post, the GTK4 and the gtk-fortran compiled libraries can be downloaded here. This post aims at providing a non-ambiguous way to install gtk-fortran and all its dependencies to a Windows user, assuming that no Fortran compiler or IDE is already setup.Īll along this post, the following applications will be installed: ![]() However, the required setup to make gtk-fortran accessible to Windows users is quite lengthy. Using gtk-fortran, one can code both the back-end (the calculation) and the front-end (the GUI) of its application with only Fortran code. Gtk-fortran is a Fortran code that makes the gtk libraries written in C accessible to Fortran programs. 6 Test with an example provided in the gtk-fortran repository.5 Visual Studio solution setup in order to use GTK 4 and gtk-fortran. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |