News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Fortran ==> undefined reference to `WinMain'

Started by RIH3306, April 04, 2015, 12:13:45 AM

Previous topic - Next topic

RIH3306

I'm stuck getting gfortran to work with codeblocks.

I followed the fortran setup  <http://wiki.codeblocks.org/index.php?title=Installing_Fortran_Compiler>

The project compiles the fortran files just fine, but linking fails with  undefined reference to `WinMain'

When I make a new project, and select console application, I see c and c++ as options, but should I see fortran?

When I create the project, a main.c is automatically added to the project, WHY?

It looks like my console application is expecting a c project, not a fortran.

What am I missing?


oBFusCATed

The console project template is c/c++ only.
I don't know if there is an empty project template for fortran.
Probably you can get better support for fortran related questions here: http://darmar.vgtu.lt/
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

RIH3306

My bad.

When making a new project, select the Fortran specific console application, not the C/C++ console application.

Thank you.