Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

building sample files in linux

7 REPLIES 7
Reply
Message 1 of 8
ssmixpro
815 Views, 7 Replies

building sample files in linux

hi,
i'm trying to make the sample programs in linux ,
when i use :
$ make
i get this :

../../lib/gcc4/x86/libfbxsdk-2013.1.so: undefined reference to `dlopen'
../../lib/gcc4/x86/libfbxsdk-2013.1.so: undefined reference to `dlclose'
../../lib/gcc4/x86/libfbxsdk-2013.1.so: undefined reference to `clock_gettime'
../../lib/gcc4/x86/libfbxsdk-2013.1.so: undefined reference to `dlsym'
../../lib/gcc4/x86/libfbxsdk-2013.1.so: undefined reference to `uuid_generate'
collect2: ld returned 1 exit status
make: *** Error 1

can anyone help , i'm using ubuntu 12.04 with gcc 4.6.3 , thnx
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: ssmixpro

Missing some libraries in linking. Add "-ldl -lrt -luuid" to the makefile.
Message 3 of 8
ssmixpro
in reply to: ssmixpro

but they're already there :


SHELL = /bin/sh

VARIANT = release
ifeq "$(VARIANT)" "debug"
GCC_DEBUG_FLAGS += -g -D_DEBUG
SUFFIX = d
endif
STATIC =

EXAMPLE = Animation
BINDIR = ../../bin/x86/$(VARIANT)/$(EXAMPLE)/
OBJDIR = ../../obj/x86/$(VARIANT)/$(EXAMPLE)/
LIBDIR = ../../lib/gcc4/x86
LIBFBXVERSION = 2013.1
INCDIR = ../../include -I../../include/kbaselib
COMMONDIR = ../Common

TARGET = $(BINDIR)/$(EXAMPLE)
OBJS = main.o $(COMMONDIR)/Common.o
OBJSFINAL = $(OBJDIR)/main.o $(OBJDIR)/Common.o

LIBS = -lm -lrt -luuid -lstdc++ -lpthread -ldl -lfbxsdk-$(LIBFBXVERSION)$(STATIC)$(SUFFIX)

CC = g++
LD = g++
RM = /bin/rm -f

CXXFLAGS = -m32 $(GCC_DEBUG_FLAGS) -DFBXSDK_SHARED
LDFLAGS = -m32 $(GCC_LINK_FLAGS)

.SUFFIXES: .cxx

all: $(TARGET)

$(TARGET): $(OBJS)
mkdir -p $(BINDIR)
$(LD) $(LDFLAGS) -o $@ $(OBJSFINAL) -L$(LIBDIR) $(LIBS) -Wl,-rpath $(PWD)/$(LIBDIR)

$(COMMONDIR)/Common.o: $(COMMONDIR)/Common.cxx
mkdir -p $(OBJDIR)
$(CC) $(CXXFLAGS) -I$(INCDIR) -c $(COMMONDIR)/Common.cxx -o $(OBJDIR)/Common.o

.cxx.o:
mkdir -p $(OBJDIR)
$(CC) $(CXXFLAGS) -I$(INCDIR) -c $< -o $*.o
mv *.o $(OBJDIR)

clean:
rm -rf $(BINDIR)
rm -rf $(OBJDIR)
Message 4 of 8
RobertGoulet
in reply to: ssmixpro

We are unable to reproduce this issue on our side. However, we only test with RedHat 6, and the latest Fedora Core. Perhaps it is a config issue in your distrib?
Robert Goulet, FBX Dev Lead
Message 5 of 8
Anonymous
in reply to: ssmixpro

you must include fbx sdk library first.. isnt it some kind of stuff people are supose to remember?
Message 6 of 8
ashcairo
in reply to: ssmixpro

Hi guys, I'm too trying to compile one of the linux samples.

When I type
make
inside a sample directory I get the following message.
make: *** No targets specified and no makefile found. Stop.


I'm using Ubuntu 12.04
Any tips would be appreciated.
Message 7 of 8
ashcairo
in reply to: ashcairo

Alright I'm now using
make -f Makefile-x64-static


However, I get the error
make: gcc4: Command not found


I tried switching to gcc in the makefile.

However, I get the compile errors
note: #pragma message: IMPORTANT NOTE: The FBX SDK API changed substantially. Please define FBXSDK_NEW_API in your project and fix compilation errors as instructed in fbxsdk_compatibility.h.


And the link error
/usr/bin/ld: cannot find -luuid


Any tips would be appreciated.
Message 8 of 8
ashcairo
in reply to: ssmixpro

Woohoo! It works now.

Pre-requisites
==============

sudo apt-get install uuid-dev
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install libx11-dev



Makefile modifications required
===============================
Change gcc4 to gcc

CC = gcc
LD = gcc


add -lX11 to LIBS

LIBS = -lfbxsdk-$(LIBFBXVERSION)$(STATIC) -lm -lrt -luuid -lc -lstdc++ -lpthread -ldl -lglut_gcc34-amd64 -lGLEW_amd64 -lGLU -lGL -lXmu -lX11



add -DFBXSDK_NEW_API to C_FLAGS and CXX_FLAGS

CFLAGS = -m64 -DFBXSDK_NEW_API
CXXFLAGS = -m64 -DFBXSDK_NEW_API

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report