User forums > General (but related to Code::Blocks)

Fortran ==> undefined reference to `WinMain'

(1/1)

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/

RIH3306:
My bad.

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

Thank you.

Navigation

[0] Message Index

Go to full version