User forums > Using Code::Blocks

Default compilers

<< < (2/3) > >>

oBFusCATed:
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Then try to build your project in the console, so you find the commands needed.
Then try to setup C::B to execute the same commands.
Then you if have troubles, write again.

shaz:
Hi,

I am new to linux programming and to CodeBlock, so I am not sure if I completely understand what you mean by building in Console. Can you please be more specific as I new to this.

I did  try what the webpage instructed, here is what I am getting in the log,

-------------- Build: Debug in TestingF ---------------

gfortran -Jobj/Debug/ -Wall  -g     -c /home/shahbaz/Downloads/CodeBlocks/TestingF/main.f90 -o obj/Debug/main.o
/usr/local/gfortran/libexec/gcc/i686-pc-linux-gnu/4.7.0/f951: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)
 
I have a very simple Hello World program.

Will deeply appreciate your help in this matter as I am quite lost. Thanks once again for your time.

oBFusCATed:
What I've suggested is to:
1. open a console window, also known as terminal (xterm, gnome-terminal, konsole)
2. cd to the directory with your source file
3. execute some commands to build the source (check the manual of gfortran for how to do so)
4. run your executable

Then you'll know what

--- Code: ---gfortran -Jobj/Debug/ -Wall  -g     -c /home/shahbaz/Downloads/CodeBlocks/TestingF/main.f90 -o obj/Debug/main.o

--- End code ---
means.

p.s. I've never used a fortran compiler, so I can't help you more.

shaz:
Hi,

Thanks for the suggestion. I did run it in terminal, even the program I was originally running. It compiles and runs perfectly fine. With no errors.

Can anyone suggest, what else could be wrong?

Thanks!!

oBFusCATed:

--- Code: ---gfortran -Jobj/Debug/ -Wall  -g     -c /home/shahbaz/Downloads/CodeBlocks/TestingF/main.f90 -o obj/Debug/main.o
/usr/local/gfortran/libexec/gcc/i686-pc-linux-gnu/4.7.0/f951: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory

--- End code ---

It seems that the gfortran executable is failing to find its libs, have you restarted gnome/kde after you've installed the gfortran?
Is you library path setup correctly?
You are using gfortran from gcc 4.7.0? The unreleased one, which is still in development?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version