DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th January 2009
welkin welkin is offline
Port Guard
 
Join Date: May 2008
Posts: 21
Thanked 1 Time in 1 Post
Default Trying to compile GLUT source code on freebsd.

Hello folks

I`m trying to compile Psypong3d on my freebsd 7.1 box.
http://psypong3d.sourceforge.net/
It`s a pong clone with nice glut graphics. The code and makefile are simple, but I run into a make error.

First, I installed freeglut.

Second, I added the FreeBSD paths for GL Libs and headers to the make-file.
Then it looks like this:

Code:
CC = gcc
OUT = pp3d

CFLAGS = -g -W -Wall -I/usr/local/include
LIBS = -lglut -lm -L/usr/local/lib

OBJECTS = common.o bmp.o main.o game.o floor.o player.o ball.o camera.o keyboard.o

$(OUT) : $(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) -o $(OUT) $(LIBS)

	@echo -e "\nBuild complete!"
	@echo -e "\nTo run the program type: ./$(OUT)\n"

clean:
	rm -rf *.o
	rm -rf $(OUT)
Third, I started make.

It compiles most part of the code, but I always get an error about main.o

main.o(.text+0xd7): In function `main':
/usr/home/welkin/psypong3d-0.9/src/main.c:38: undefined reference to `on_exit'
gmake: *** [pp3d] Error 1

I`m not very experienced with makefiles, so maybe someone has a idea.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
explore source code for installed program bsdnewbie999 OpenBSD General 1 23rd February 2009 06:13 AM
Google released Android source code graudeejs Off-Topic 1 22nd October 2008 10:02 PM
Source code for ed? matt FreeBSD Ports and Packages 1 21st October 2008 08:18 PM
Kernel Compilation --> Error code 2 --> geom_part_pc98 (FreeBSD 7.0) stou FreeBSD Installation and Upgrading 15 11th October 2008 04:43 AM
Source code of coreutils to create Incident Response Disk audio FreeBSD General 6 5th July 2008 11:00 AM


All times are GMT. The time now is 06:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick