LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2019, 07:49 AM   #1
rahulvishwakarma
Member
 
Registered: Aug 2010
Posts: 128

Rep: Reputation: 2
/usr/bin/ld: cannot find -lgraph in compilation of libgraph


hi to all, I've centos 7.5 in VM and I am trying to install libgraph-1.0.2. but after successful configuraiton ( ./configure ) and then trying to "make" i found following error :-
Code:
/usr/bin/ld: cannot find -lgraph
hwo to recover this error.
 
Old 12-17-2019, 08:23 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,396

Rep: Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625
Quote:
Originally Posted by rahulvishwakarma View Post
hi to all, I've centos 7.5 in VM and I am trying to install libgraph-1.0.2. but after successful configuraiton ( ./configure ) and then trying to "make" i found following error :-
Code:
/usr/bin/ld: cannot find -lgraph
hwo to recover this error.
Did you read and follow the instructions in both the README and INSTALL files that are included in the file you downloaded?? You've had numerous threads where you've either not responded at all, haven't followed the advice given, or have shown little to no effort of your own first. Again, read the "Question Guidelines".
 
1 members found this post helpful.
Old 12-17-2019, 09:48 AM   #3
rahulvishwakarma
Member
 
Registered: Aug 2010
Posts: 128

Original Poster
Rep: Reputation: 2
yes i've read all in Install and readme files, but found nothing regarding this error.
 
Old 12-17-2019, 09:52 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,396

Rep: Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625
Quote:
Originally Posted by rahulvishwakarma View Post
yes i've read all in Install and readme files, but found nothing regarding this error.
...because you didn't follow the instructions in those files. There are a specific list of things you need to install first. If you read and follow the instructions, you won't get errors.
 
Old 12-17-2019, 09:59 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,397

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
No issues here, CentOS 7 :
Code:
# yum install SDL-devel.x86_64 SDL_image-devel.x86_64 guile-devel.x86_64
                         // The SDL_image packages are in the EPEL repo
$ tar xvf libgraph-1.0.2.tar.gz
$ cd libgraph-1.0.2/
$ ./configure --prefix=/usr --libdir=/usr/lib64 && make
# make install
Result = libgraph-1.0.2-1.el7.x86_64.rpm
Link https://drive.google.com/file/d/1sxJ...ew?usp=sharing

Download ... and install :
Code:
# yum install Downloads/libgraph-1.0.2-1.el7.x86_64.rpm
Simplified tree (Get a full file list with $ rpm -ql libgraph)
Code:
usr/
├── bin/
│   └── grc
├── include/
│   ├── {graphics.h grtext.h polygon.h shapes.h}
├── lib64/
│   ├── {libgraph.a, libgraphite2.so.3 -> libgraphite2.so.3.0.1, libgraph.la
│   ├── libgraph.so -> libgraph.so.1.0.2, libgraph.so.1 -> libgraph.so.1.0.2}
│   └── pkgconfig/
│       └── libgraph.pc
└── share/
    └── man/
        ├── {man1/ man3/ man7/}
9 directories, 70 files

Last edited by knudfl; 12-17-2019 at 10:18 AM.
 
Old 12-17-2019, 11:12 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,396

Rep: Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625
Quote:
Originally Posted by knudfl View Post
No issues here, CentOS 7 :
Code:
# yum install SDL-devel.x86_64 SDL_image-devel.x86_64 guile-devel.x86_64
                         // The SDL_image packages are in the EPEL repo
$ tar xvf libgraph-1.0.2.tar.gz
$ cd libgraph-1.0.2/
$ ./configure --prefix=/usr --libdir=/usr/lib64 && make
# make install
Result = libgraph-1.0.2-1.el7.x86_64.rpm
Link https://drive.google.com/file/d/1sxJ...ew?usp=sharing
Yep...those SDL packages are explicitly mentioned in the README, which the OP said that they read.
Code:
**** FROM THE TOP PART OF THE README FILE ****
What do I need ?
----------------
        You need to have the following installed : 
                SDL-x.x.x.rpm                           -- the main SDL library
                SDL-devel-x.x.x.rpm             -- the developer package
                SDL_image-x.x.x.rpm             -- image library for fonts
                SDL_image-devel-x.x.x.rpm       -- image library developer
Without the SDL packages, you do get the aforementioned error.
 
2 members found this post helpful.
Old 12-18-2019, 03:25 AM   #7
rahulvishwakarma
Member
 
Registered: Aug 2010
Posts: 128

Original Poster
Rep: Reputation: 2
thanks a lot, finally i installed libgraph on my centos7.5.
i install above rpm and then reinstalling libgraph, it happened
i ran this program i in codeblocks :-

Code:
#include<stdio.h> 
#include<stdlib.h> 
#include<graphics.h> 
int main() 
{ 
    int gd = DETECT, gm; 
    initgraph(&gd, &gm, NULL); 
  
    circle(50, 50, 30); 
  
    delay(500000); 
    closegraph(); 
    return 0; 
}
and i linked "graph", in search "/usr/local/include" and in linker "/usr/local/lib"
and it ran fine.

Last edited by rahulvishwakarma; 12-18-2019 at 03:36 AM.
 
Old 12-18-2019, 03:46 AM   #8
rahulvishwakarma
Member
 
Registered: Aug 2010
Posts: 128

Original Poster
Rep: Reputation: 2
problem of installing of libgraph is solved but now again one problem is here :-
when i run program in codeblocks ide it runs fine but when i run its executable file in terminal it shows following error :
Code:
[rahul@centos7client Debug]$ ./graphincpp 
The font has not been loaded!
 
Old 12-18-2019, 08:22 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,396

Rep: Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625Reputation: 6625
Quote:
Originally Posted by rahulvishwakarma View Post
thanks a lot, finally i installed libgraph on my centos7.5. i install above rpm and then reinstalling libgraph, it happened i ran this program i in codeblocks :-
Code:
#include<stdio.h> 
#include<stdlib.h> 
#include<graphics.h> 
int main() 
{ 
    int gd = DETECT, gm; 
    initgraph(&gd, &gm, NULL); 
  
    circle(50, 50, 30); 
  
    delay(500000); 
    closegraph(); 
    return 0; 
}
and i linked "graph", in search "/usr/local/include" and in linker "/usr/local/lib" and it ran fine.
...and....
Quote:
Originally Posted by rahulvishwakarma
problem of installing of libgraph is solved but now again one problem is here :- when i run program in codeblocks ide it runs fine but when i run its executable file in terminal it shows following error :
Code:
[rahul@centos7client Debug]$ ./graphincpp 
The font has not been loaded!
Right; did you think about what you installed and how???

AGAIN: you need to **READ AND FOLLOW** the instructions on installing libgraph, and remove the package you installed. knudfl followed the instructions and generated a package....which was based on the configure program for HIS SYSTEM. The paths/fonts/whatever you're using on YOUR system are different, and because you didn't install the correct SDL packages/libraries, and configure/link against them, you have an error. Since you've been using Codeblocks for at least five years now, you know that it does linking and other things to paths for you, based on how you configure it.
 
  


Reply

Tags
libgraph


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A find process taking up CPU (su nobody -s /bin/sh -c /usr/bin/find /) linuxandtsm Linux - Newbie 7 06-14-2013 05:35 PM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 05:00 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 09:33 AM
FreeBSD 6.2, no /usr/src/tools and /usr/src/usr.bin, failed to build world. Mr_Shameless *BSD 4 05-16-2008 09:43 AM
/usr/bin/X11/ and /usr/X11R6/bin/ the same? linuxtesting2 Linux - Newbie 2 11-16-2004 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration