Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling F# code on Ubuntu 12.04 using Monodevelop

I followed the instructions here for installing Monodevelop with F# support on Ubuntu, however when I open Monodevelop and try to compile a simple F# program I get the message:

Error: Framework '.NETFramework 4.5' not installed.

If I manually compile on the command line using the same compiler Monodevelop is using (/usr/bin/fsharpc) the file compiles and produces an executable that runs just fine. Why won't the project compile in Monodevelop and is there a way to fix it?

like image 456
user1916823 Avatar asked Dec 19 '12 19:12

user1916823


People also ask

How do I compile a Fortran program?

Detailed explanation of the compilation processThe f77 command performs this step by calling the link editor and producing the executable file "main.exe". The final step is to link them together to make the executable file "main.exe".

What is mpif90 in Linux?

Description. This command can be used to compile and link MPI programs written in Fortran. It provides the options and any special libraries that are needed to compile and link MPI programs. It is important to use this command, particularly when linking programs, as it provides the necessary libraries.

How do I run a Fortran 77 program in Linux?

The Fortran 77 compilers are usually called f77. The output from the compilation is given the somewhat cryptic name a. out by default, but you can choose another name if you wish. To run the program, simply type the name of the executable file, for example a.


1 Answers

Officially (as of 2013) MonoDevelop/XamarinStudio doesn't support F# yet. So the F# support is not officially supported by Xamarin.

However you can use Visual Studio 2012 (or SharpDevelop) to build F# projects on Windows (targeting .NET Framework 3.0), and then move the compiled binary to Linux.

I've tried this, and this solution is working.

like image 63
dns Avatar answered Sep 18 '22 19:09

dns