LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2005, 08:41 AM   #1
linorg
Member
 
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32

Rep: Reputation: 15
problem with make


hi
i'm trying to install the KHERPA simulator (a mobile robot sim)
but am having problems with it when i run the make file i get the following errors

[root@rhlinorg SIM]# make
gcc -L/usr/lib -lX11 -lm OBJ/sim.o OBJ/robot.o OBJ/world.o OBJ/graphics.o OBJ/khep_serial.o OBJ/user.o -o sim
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make: *** [sim] Error 1

the make file is given below

File: Makefile for Khepera Simulator (example 0)
#Author: Olivier MICHEL <om@alto.unice.fr>
#Date: Tue Feb 13 11:29:50 MET 1996

# Copyright (c) 1995, 1996
# Olivier MICHEL
# MAGE team, i3S laboratory,
# CNRS, University of Nice - Sophia Antipolis

# Permission is hereby granted to copy all or any part of
# this program for free distribution. The author's name
# and this copyright notice must be included in any copy.
# Commercial use is forbidden.

VPATH=OBJ/:SRC/:USER/

CFLAGS = -I/usr/include \
-O3

LIBS = -L/usr/lib -lX11 -lm

cc = gcc $(CFLAGS) -c

CC = gcc $(LIBS)

sim: sim.o robot.o world.o graphics.o khep_serial.o user.o
$(CC) OBJ/sim.o OBJ/robot.o OBJ/world.o OBJ/graphics.o OBJ/khep_serial.o OBJ/user.o -o sim

sim.o: sim.c sim.h
$(cc) SRC/sim.c -o OBJ/sim.o
robot.o: robot.c robot.h
$(cc) SRC/robot.c -o OBJ/robot.o
world.o: world.c world.h
$(cc) SRC/world.c -o OBJ/world.o
graphics.o: graphics.c graphics.h
$(cc) SRC/graphics.c -o OBJ/graphics.o
khep_serial.o: khep_serial.c khep_serial.h gen_types.h
$(cc) SRC/khep_serial.c -o OBJ/khep_serial.o
user.o: user.c user.h user_info.h include.h
$(cc) USER/user.c -o OBJ/user.o
header.h: types.h graphics.h sim.h robot.h world.h
touch SRC/header.h

clean:
rm -f sim OBJ/*.o


can somebody plz help me out
thanks linorg
 
Old 01-25-2005, 08:57 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Your problem is right here:

LIBS = -L/usr/lib -lX11 -lm

You X11 library appears to not be in /usr/lib. Find it (libX11.so) and add the path this line. For instance, on my machine libX11.so is in /usr/X11R6/lib so I would change the line to LIBS = -L/usr/X11R6/lib -lX11 -L/usr/lib -lm

I hope that helps.
 
Old 01-25-2005, 09:06 AM   #3
linorg
Member
 
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32

Original Poster
Rep: Reputation: 15
thanks a lot this really soved the problem
 
Old 01-25-2005, 10:05 AM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
hint: when posting code (whitespace-sensitive code such as python and makefiles in particular), put it in code-tags; makes it a lot easier to read
 
  


Reply


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
make xconf;make gconf problem Soqool Linux - Newbie 3 06-12-2005 12:00 PM
Problem with Configure, Make, Make Install n8tgc Linux - Newbie 2 07-13-2004 03:16 PM
How to make rule for make install and make uninstall melinda_sayang Programming 1 06-14-2004 05:58 AM
make clean, make dep problem carscht Linux - Newbie 2 02-21-2004 10:32 AM
make dep,make clean,make bzImage problem Babba Linux - Newbie 2 01-08-2003 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:19 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