Author Topic: about the using fortran in code blocks  (Read 2686 times)

computerlion

  • Guest
about the using fortran in code blocks
« on: December 17, 2019, 03:32:21 am »
when I use "sind" function in gfortran, and build the program in codeblocks, the build messages shows undefined reference to "sind". I found that "sind" function is a GNU extension, should be enabled with "-fdec-math", how can I set "-fdec-math" in code blocks? I added a compiler flag in "setting"->"compiler", but it still does not work. (I use gcc v8.1.0.)


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: about the using fortran in code blocks
« Reply #2 on: December 17, 2019, 12:38:09 pm »
Quote
"setting"->"compiler"
This is the wrong place. This is the place for global compiler flags. The right place would be
Project->Build options->Select the project name on the left->Compiler settings