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

link GMP library when using codeblocks

(1/2) > >>

mahaju:
Hello everyone
I am using Codeblocks 8.02 in Puppy Linux
I have gcc and GMP library installed
When I compile a program that GMP header file through the command line, I need to invoke the GMP library by giving this command

gcc -o oufile codefile.c -lgmp

How do I set the -lgmp parameter if I want to compile my program from codeblocks?

Thanks in advance

MortenMacFly:

--- Quote from: mahaju on December 09, 2011, 01:06:27 pm ---How do I set the -lgmp parameter if I want to compile my program from codeblocks?

--- End quote ---
Create a project, go to the linker tab in the project options, add "gmp" as linker library.

I also suggest you consult the C::B manual for some screenshots:
http://www.codeblocks.org/docs/main_codeblocks_en.html

mahaju:
Hi
When I try to add new files to a project it shows a box saying adding files to the project and then sort of stops there
Here's a screenshot
What is the problem here?
PS: I am running this in VMWare

[attachment deleted by admin]

Alpha:
I cannot say whether or not this is the problem, however I would suggest you try updating Code::Blocks to at least version 10.05 (8.02 is quite old, and many features have been fixed/added since then).

mahaju:
Thank you for the reply
however, I found out how to solve this particular problem
Just ignore the dialogue box that appears in the front, click on the one in the back and check the debug and/or release check boxes and press OK
Also I was not able to figure out how to get Codeblocks 10 for Puppy Linux 5.2.8 so I am using this one, since it is available as .pet package in the forums

Navigation

[0] Message Index

[#] Next page

Go to full version