LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 10-15-2012, 05:25 AM   #1
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Rep: Reputation: 11
Makefile installation with make command for glvisualizer


Hi ,

I have a Dell machine with Ubuntu 10.04 LTS version.

I have a installed a simulator called ns-3.9-vanet. I have installed it successfully.
Then there is Visualizer program, I have to install, called "glvisualizer", I extracted all the files, and with 'make' command, it is instructed to install, I did it, but I found some errors,

Quote:
khan@khan:~/glvisualizer$ make
gcc -Wall -o glvisualizer *.c -lglut -lm -lpng
/usr/bin/ld: /tmp/cccRZiKr.o: in function initRendering:glvisualizer.c(.text+0x54b): error: undefined reference to 'glShadeModel'
/usr/bin/ld: /tmp/cccRZiKr.o: in function initRendering:glvisualizer.c(.text+0x557): error: undefined reference to 'glEnable'
/usr/bin/ld: /tmp/cccRZiKr.o: in function initRendering:glvisualizer.c(.text+0x56b): error: undefined reference to 'glHint'
/usr/bin/ld: /tmp/cccRZiKr.o: in function initRendering:glvisualizer.c(.text+0x578): error: undefined reference to 'glLineWidth'
/usr/bin/ld: /tmp/cccRZiKr.o: in function initRendering:glvisualizer.c(.text+0x5a0): error: undefined reference to 'glClearColor'
/usr/bin/ld: /tmp/cccRZiKr.o: in function handleResize:glvisualizer.c(.text+0x5ca): error: undefined reference to 'glViewport'
/usr/bin/ld: /tmp/cccRZiKr.o: in function handleResize:glvisualizer.c(.text+0x5d6): error: undefined reference to 'glMatrixMode'
/usr/bin/ld: /tmp/cccRZiKr.o: in function handleResize:glvisualizer.c(.text+0x5db): error: undefined reference to 'glLoadIdentity'
/usr/bin/ld: /tmp/cccRZiKr.o: in function handleResize:glvisualizer.c(.text+0x5fb): error: undefined reference to 'gluOrtho2D'
/usr/bin/ld: /tmp/cccRZiKr.o: in function handleResize:glvisualizer.c(.text+0x629): error: undefined reference to 'glOrtho'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x64a): error: undefined reference to 'glColor3f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x656): error: undefined reference to 'glBegin'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x668): error: undefined reference to 'glVertex2f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x67a): error: undefined reference to 'glVertex2f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x68c): error: undefined reference to 'glVertex2f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x69e): error: undefined reference to 'glVertex2f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawRectangle:glvisualizer.c(.text+0x6a3): error: undefined reference to 'glEnd'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawLine:glvisualizer.c(.text+0x6c4): error: undefined reference to 'glColor3f'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawLine:glvisualizer.c(.text+0x6d0): error: undefined reference to 'glBegin'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawLine:glvisualizer.c(.text+0x6f9): error: undefined reference to 'glEnd'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawScene:glvisualizer.c(.text+0xe47): error: undefined reference to 'glClear'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawScene:glvisualizer.c(.text+0xe53): error: undefined reference to 'glMatrixMode'
/usr/bin/ld: /tmp/cccRZiKr.o: in function drawScene:glvisualizer.c(.text+0xe58): error: undefined reference to 'glLoadIdentity'
/usr/bin/ld: /tmp/cccRZiKr.o: in function main:glvisualizer.c(.text+0x110a): error: undefined reference to 'glGetIntegerv'
collect2: ld returned 1 exit status
make: *** [glvisualizer] Error 1
khan@khan:~/glvisualizer$
Here is the text of Makefile file,

Code:
CC = gcc
CPP = g++
CFLAGS = -Wall 
#default, linux libs
LIBS = -lglut -lm -lpng
PROG = glvisualizer

SRCS = *.c

ifeq "$(OS)" "Windows_NT"
	CFLAGS := $(CFLAGS) -DGLUT_STATIC
	LIBS := -lm -lglut32 -lglu32 -lopengl32 -lgdi32 -lwinmm -lpng
else
	ifeq ($(shell uname),Darwin)
		LIBS = -framework OpenGL -framework GLUT 
	endif
endif

all: $(PROG)

$(PROG):	$(SRCS)
	$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS)

debug:
	$(CC) $(CFLAGS) -g -o $(PROG) $(SRCS) $(LIBS)

profile:
	$(CC) $(CFLAGS) -pg -o $(PROG) $(SRCS) $(LIBS)

clean:
	rm -f $(PROG)
I have installed OpenGl libraries also, but I could not come to solve it.

Could anyone please help me ? I thank you in advance !
 
Old 10-15-2012, 02:11 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,260

Rep: Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660Reputation: 2660
"glvisualizer" :
http://vnt.disi.unitn.it/downloads.php
http://vnt.disi.unitn.it/downloads/glvisualizer.tar.bz2

Prerequisites for glvisualizer :
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libglut3-dev libpng12-dev

The libGL and libGLU entries are missing from the Makefile.
Please edit line 5 to :
Code:
LIBS = -lGL -lGLU -lglut -lm -lpng
.
 
1 members found this post helpful.
Old 10-16-2012, 09:42 AM   #3
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
Thanks a lot knudfl.

I have successfully installed it by following your suggestions. I got the binary file glvisualizer after running the ' make ' command.

You are the champions of linux !
Hats Off to you !
 
  


Reply

Tags
glvisualizer, makefile, ns3, ns3-vanet, opengl, ubuntu104, vanet


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
[SOLVED] need of makefile info ? how the linux make file is different from simple c makefile ? rpittala Linux - Newbie 2 05-07-2012 09:04 PM
make: Warning: Both `makefile' and `Makefile' exist ? malli42108 Solaris / OpenSolaris 5 10-24-2009 10:09 AM
Belkin Wirless G RTL8185L make[1]: *** No rule to make target `Makefile'. Stop. SilverRock Linux - Wireless Networking 2 02-11-2007 08:25 AM
how does a "makefile" relate to the make command? mjewell Linux - Newbie 3 01-17-2004 09:27 PM


All times are GMT -5. The time now is 11: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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration