User forums > Using Code::Blocks

Building a Fortran project using .o module files

<< < (3/3)

gd_on:
OK. -g is set.
but the debugger is gdb, not gcc which is the C compiler.
Have you gdb.exe in your distribution ? probably somewhere in a \bin folder. With some gcc distibutions, it's not included !
If you have not it, I suggest to install a 8.1.0 version, you can find in https://sourceforge.net/projects/mingw-w64/files/.
To compile in 64 bits, I suggest x86_64-posix-seh version. It's the compiler used by Codeblocks team.

I also see in your path variable that you have at least two sets of compilers installed (9.2, 8.3, and ???) :


--- Quote ---C:\Program Files\gcc\bin;
C:\Program Files\gcc\bin\bin;
C:\Users\Rémi COQUARD\gcc\bin;
C:\Users\Rémi COQUARD\gcc\bin\bin;
C:\Program Files\gcc\libexec\gcc\x86_64-w64-mingw32\9.2.0;
C:\Users\Rémi COQUARD\gcc\libexec\gcc\x86_64-w64-mingw32\8.3.0;
--- End quote ---

It may be confusing if the path and versions within codeblocks are not correctly set.

COQ:
Dear,

Thank you so much. I don't know why but I actually do not specify the right debugger executable (gcc.exe instead of gdb.exe ....).

All is OK now ... I hope ....

Thank you again for your patience

gd_on:
OK.
Take care also that in your paths you have your name with a é and a space. Sometimes this gives problems.

COQ:
Dear gd_on,

I take the liberty of recontacting you for another problem.
I have installed CodeBlocks and the gfortran compiler on another Personal Computer which actually uses Windows7 (instead of Windows10 for my PC).

The compilation of the same project is OK until I try to build the solution.
I receive the following error message :
"gfortran.exe: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not found
compilation terminated."
 
Attached is the corresponding Build_Log file

Thank you again by advance

COQ

gd_on:
I can't really answer.
Nevertheless, I don't think it's a Win7 / Win10 problem. It's more a problem with your gcc installation(s).
On your Win10, this dll is probably found somewhere in the Windows path, but probably not in your desired compiler path. As I told you in a previous post, I see several gcc install in your path. So, may be (once again, I can only suppose ...), this dll is in one of this install on Win10, but not on your Win7 PC.
I made a google search with liblto_plugin and found : https://stackoverflow.com/questions/11248116/using-mingw-to-compile-c-code-but-error-liblto-plugin-0-dll-not-found
But you can find other solutions.

As you told, you have only some .o (and probably also .mod) for some part of your soft. They were compiled with gfortran 8.3, from a gcc 8.3 distribution. OK. But are you sure you use exactly the same compiler from the same distribution ? I say that because some distributions are statically compiled, so no need for dll in general, and other are dynamically linked so need dlls.
So, if your .o were compiled with a dynaically linked compiler and you use a statically one, this is the problem... But, just a supposition.
An other supposition : some installers on some distributions require to set a specific environment variable (via an install.bat or update.bat ...). may be your Win7 and Win10 install have not the same environment variables ...

After looking in my own gcc install, I can find this dll. So I can suppose than on your Win7 PC, the path to this dll is wrongly configured. Why, I don't know. If you have it, try to add the folder where it is located in your Windows path (or with a -L linker setting, search path for linker).

Navigation

[0] Message Index

[*] Previous page

Go to full version