User forums > Using Code::Blocks

Setting up GNU G77

<< < (3/3)

gsal:
Well, I was just trying g77 from the command line and it worked...but when I tried the same entire command as put together by C::B, then I get the same error message from the command line as well.

Idea 1.- Make C::B put together a command as simple as possible, i.e., g77, by editing Compiler settings:
  - Remove library path under Directories
  - Remove -lg2c (that's all I had) Lunder Linker options
=> IT WORKS

Idea 2.- Don't quite understand your explanation about Win32 entry point, but with that hint and the reference to -lstdc++ in the Wiki (even though I don't think I have a mixed project) and went ahead and added -lstdc++ under Linker Options along with -lg2c
=> IT WORKS, as well.

So, I am good shape now, even though I don't quite understand ... maybe -lg2c is bringing some c/c++  code into the picture and hence my project becomes mixed.

Thanks and do you have any additional comments to further explain what is happening? If not that's o.k.  Thanks, again.

gsal

TDragon:
Well, I'm not at all familiar with the way G77 works, but my only guess would have been that libg2c requires Win32 functionality and thus was looking for a nonexistent WinMain. Since Win32 doesn't imply C++, I have no idea why including libstdc++ fixed the problem.

Navigation

[0] Message Index

[*] Previous page

Go to full version