Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with Arcsynthesis OpenGL 3.3 tutorials - MAKE error

I've been following arcsynthesis(arcsynthesis.org/gltut/) tutorial and come across with the following errors during make. I used premake4 gmake to generate makefiles.

==== Building Tut 13 Basic Impostor (debug) ====
Creating obj/Debug/Tut 13 Basic Impostor
BasicImpostor.cpp
Linking Tut 13 Basic Impostor
/usr/bin/ld: ../glsdk/freeglut/lib/libfreeglutD.a(freeglut_window.o): undefined reference to symbol 'XGetWindowAttributes'
/usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Tut 13 Basic ImpostorD] Error 1
make: *** [Tut 13 Basic Impostor] Error 2

Here's my makefile. I am not sure if this is what you were asking for, as I am beginner in Ubuntu:

# GNU Make solution makefile autogenerated by Premake
# Type "make help" for usage help

ifndef config
  config=debug
endif
export config

PROJECTS := framework Tut\ 13\ Basic\ Impostor Tut\ 13\ Geometry\ Impostor

.PHONY: all clean help $(PROJECTS)

all: $(PROJECTS)

framework: 
    @echo "==== Building framework ($(config)) ===="
    @${MAKE} --no-print-directory -C ../framework -f Makefile

Tut\ 13\ Basic\ Impostor: framework
    @echo "==== Building Tut 13 Basic Impostor ($(config)) ===="
    @${MAKE} --no-print-directory -C . -f Tut\ 13\ Basic\ Impostor.make

Tut\ 13\ Geometry\ Impostor: framework
    @echo "==== Building Tut 13 Geometry Impostor ($(config)) ===="
    @${MAKE} --no-print-directory -C . -f Tut\ 13\ Geometry\ Impostor.make

clean:
    @${MAKE} --no-print-directory -C ../framework -f Makefile clean
    @${MAKE} --no-print-directory -C . -f Tut\ 13\ Basic\ Impostor.make clean
    @${MAKE} --no-print-directory -C . -f Tut\ 13\ Geometry\ Impostor.make clean

help:
    @echo "Usage: make [config=name] [target]"
    @echo ""
    @echo "CONFIGURATIONS:"
    @echo "   debug"
    @echo "   release"
    @echo ""
    @echo "TARGETS:"
    @echo "   all (default)"
    @echo "   clean"
    @echo "   framework"
    @echo "   Tut 13 Basic Impostor"
    @echo "   Tut 13 Geometry Impostor"
    @echo ""
    @echo "For more information, see http://industriousone.com/premake/quick-start"
like image 686
user3154369 Avatar asked Jan 02 '14 16:01

user3154369


1 Answers

You are missing -lX11 switches in your Makefiles, and this particular linker error is telling you that libfreeglutD depends on the dynamic shared object (DSO): libX11.so.

You will have to add this to the two makefiles: Tut\ 13\ Basic\ Impostor.make and Tut\ 13\ Geometry\ Impostor.make. It is very likely that in order to run other tutorials from Arcsynthesis you are going to have to do the same.

like image 138
Andon M. Coleman Avatar answered Oct 23 '22 16:10

Andon M. Coleman