Results 1 to 5 of 5
WindowsDude is back!
This time he has another delicate problem.
He has recently compiled libgmp and now he wants to include it in his project.
He writes like this: gcc ...
- 11-29-2010 #1
Compile with library
WindowsDude is back!
This time he has another delicate problem.
He has recently compiled libgmp and now he wants to include it in his project.
He writes like this: gcc -lgmp project.c
The problem is that -lgmp doesn't seem to load. What should he do to make it load?
He has compiled libgmp in some local folder, but he wants it to be globally accessible. What are the magic key words for this? (Note: In -real- OSes made by real people this is never a problem. The DOS-days are over.).
+ Why are there dozens of unexplainable folders in the root directory? Why not just put all systems folders into one big Linux-folder and keep everything in order? I don't even know where to put programs that I install. Linux is doomed to stay in the world of permanent beta software!
- 12-01-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You need to set your LD_LIBRARY_PATH environment variable to point to the location of the shared library if it hasn't been installed in one of the usual places (/usr/lib, /usr/lib64, etc).
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 12-27-2010 #3
WindowsDude is back in the shady domains of nix and takes another look at this major problem.
He does the following:
LD_LIBRARY_PATH=/Users/windowsdude/Downloads/gmp-5.0.1
gcc -L/Users/windowsdude/Downloads/gmp-5.0.1/ -lgmp /Users/windowsdude/Desktop/main.c
But to his despair he gets errors where gmp variables aren't recognized. It probably doesn't find the library. gmp.h: No such file or directory (but it's inside that gmp folder).
Why is that.
On a side note: On the one and only real OS it is possible to use real tools like Visual Studio where compilation is made in one click, where paths are clear and where debugging can be done easily by breakpointing lines and checking their values inside the program. What's the linux equivalent?
- 12-27-2010 #4
- 12-28-2010 #5
The problem is when I try to compile (I don't have an executable).
This line produces the error gmp.h: No such file or directory
gcc -L/Users/windowsdude/Downloads/gmp-5.0.1/ -lgmp /Users/windowsdude/Desktop/main.c


Reply With Quote
