Hey guys,
My goal is to get a User Interface for my embedded Blackfin Device running
on uClinux with nano-X 0.91 and nxlib.
First I did a clean configure of FLTK2 and installed it on my host machine
for testing my App on debian-linux. This went
very well.
The next step I did was to configure fltk2 that I can compile it with
blackfin-toolchain. With this makeinclude file generated
by the configure script I compiled fltk2 without any problems.
Makeinclude:
prefix = /home/mheiser/fltk/fltk2-bfin
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
datadir = ${prefix}/share
docdir = ${prefix}/share/doc/fltk
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
mandir = ${prefix}/share/man
srcdir = .
# programs we use...
CHMOD = chmod
CP = cp
HTMLDOC =
LN = ln -s
MKDIR = mkdir -p
NROFF = /usr/bin/nroff
RM = rm -f
RMDIR = rm -rf
SHELL = /bin/sh
STRIP = strip
# compiler names:
CC = bfin-linux-uclibc-gcc
CXX = bfin-linux-uclibc-gcc
MAKEDEPEND = $(CXX) -MM -DMAKEDEPEND
# flags for C++ compiler:
OPTIM = -O2 -Wall -Wunused
CFLAGS = $(OPTIM) -O2 -pipe -isystem
/home/mheiser/uClinux/MyStaging/usr/include
-I/home/mheiser/uClinux/MyStaging/usr/include/X11/include
CXXFLAGS = $(OPTIM) -O2 -pipe -isystem
/home/mheiser/uClinux/MyStaging/usr/include
-I/home/mheiser/uClinux/MyStaging/usr/include/X11/include
-I/home/mheiser/uClinux/MyStaging/usr/include/X11/include
-Wno-non-virtual-dtor
# programs and definitions to make static libraries:
LIBCOMMAND = /usr/bin/ar cr
LIBPREFIX = lib
LIBSUFFIX = .a
LIBTARGET = static
RANLIB = bfin-linux-uclibc-ranlib
# programs and definitions to make shared libraries:
DSOCOMMAND = echo
DSOLINK =
DSOPREFIX =
DSOSUFFIX =
DSOSYMLINK =
DSOTARGET =
# local image targets
LOCALIMAGES =
ZLIBINC =
# libraries to link with:
LDLIBS = -L/home/mheiser/uClinux/MyStaging/usr/lib
-L/home/mheiser/uClinux/MyStaging/usr/lib -lX11 -lpthread -lm -lnano-X
-lsupc++
GLDLIBS = -L/home/mheiser/uClinux/MyStaging/usr/lib
-L/home/mheiser/uClinux/MyStaging/usr/lib -lX11 -lpthread -lm -lnano-X
-lsupc++
LINKFLTK = -L../lib -lfltk2
LINKFLTKGL = -L../lib -lfltk2
LINKFLTKFORMS = -L../lib -lfltk2_forms -lfltk2
LOCAL_IMAGELIBS =
LINKFLTKIMG = -L../lib -lfltk2_images -lfltk2 $(LOCAL_IMAGELIBS)
$(IMAGELIBS)
LINKSHARED = -L../lib -lfltk2_images -lfltk2 $(IMAGELIBS)
IMAGELIBS = -lpng -lfltk2_images -ljpeg -lz
# program to build themes with
THEMECOMMAND = ${CXX} -shared -o
# The extension to use for executables...
EXEEXT =
# Which targets should be built?
BUILDTARGETS = programs
INSTALLTARGETS = install_programs
# Do we build the OpenGL demos?
GLDEMOS =
# Do we build the threads demo?
THREADS = threads
# Name of FLUID executable we install
#FLUID = fluid2$(EXEEXT)
FLUID = fluid2$(EXEEXT)
# Possible steps after linking...
POSTBUILD = :
# Man page extensions...
CAT1EXT = 1
CAT3EXT = 3
# Be quiet when building...
.SILENT:
# Build commands and filename extensions...
.SUFFIXES: .0 .1 .3 .c .cxx .h .fl .man .o .z $(EXEEXT)
.o$(EXEEXT):
echo Linking $...@...
$(CXX) -I.. -I../fltk/compat $(CXXFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@
$(POSTBUILD) $@ ../fltk/mac.r
.c.o:
echo Compiling $<...
$(CC) -I.. -I../fltk/compat $(CFLAGS) -c $<
.cxx.o:
echo Compiling $<...
$(CXX) -I.. -I../fltk/compat $(CXXFLAGS) -c $<
.man.0 .man.1 .man.3:
echo Formatting $<...
rm -f $@
$(NROFF) -man $< >$@
.man.z:
echo Formatting $<...
rm -f $@ t.z
$(NROFF) -man $< >t
pack -f t
mv t.z $@
After proper compilation of fltk2 I copied the library-files and the
fltk/include folder to a place where
my libs for my app are. I develop the App using Eclipse 3.5. I added the
Include Path and the Library Path
to my Project-Settings as I always do.
When I start compiling, the compiler does its job but the linkage of the
project goes wrong.
I get some errors like:
/opt/uClinux-2008R1.5/bfin-linux-uclibc/bin/bfin-linux-uclibc-g++
-L/home/mheiser/uClinux/MyStaging/usr/lib -mcpu=bf537-any -o"CCUI" ./CCUI.o
./CCUI_BA_PicHandle.o ./CCUI_BesucherAlbumDlg.o ./CCUI_CommFuncs.o
./CCUI_Dlg.o ./CCUI_FileHandle.o ./CCUI_KennzifferneingabeDlg.o
./CCUI_Thread.o ./main.o ./Wrapper/MsgQueueFuncs.o ./Wrapper/SocketFuncs.o
./Wrapper/ThreadingFuncs.o -lfltk2 -lfltk2_images -ljpeg -lpng -lz -lX11
-lnano-X -lfreetype -lpthread
./CCUI.o: In function `CCUI_GUI::CCUI_GUI()':
../CCUI.cxx:(.text+0x88): undefined reference to `fltk::Group::Group(int,
int, int, int, char const*, bool)'
../CCUI.cxx:(.text+0x1de): undefined reference to `fltk::Group::Group(int,
int, int, int, char const*, bool)'
../CCUI.cxx:(.text+0x2b8): undefined reference to `fltk::Group::Group(int,
int, int, int, char const*, bool)'
../CCUI.cxx:(.text+0x5dc): undefined reference to `fltk::Group::Group(int,
int, int, int, char const*, bool)'
./CCUI.o: In function `CCUI_GUI::CCUI_GUI()':
../CCUI.cxx:(.text+0x83c): undefined reference to `fltk::Group::Group(int,
int, int, int, char const*, bool)'
./CCUI.o:../CCUI.cxx:(.text+0x992): more undefined references to
`fltk::Group::Group(int, int, int, int, char const*, bool)' follow
./CCUI_BesucherAlbumDlg.o: In function
`CCUI_BesucherAlbumDlg::BA_aktuell_cbi(fltk::Button*)':
../CCUI_BesucherAlbumDlg.cxx:(.text+0x2fc): undefined reference to
`fltk::Widget::state(bool)'
./CCUI_BesucherAlbumDlg.o: In function
`CCUI_BesucherAlbumDlg::BA_fright_cbi(fltk::Button*)':
../CCUI_BesucherAlbumDlg.cxx:(.text+0x458): undefined reference to
`fltk::Widget::state(bool)'
./CCUI_BesucherAlbumDlg.o: In function
`CCUI_BesucherAlbumDlg::BA_fleft_cbi(fltk::Button*)':
../CCUI_BesucherAlbumDlg.cxx:(.text+0x5ac): undefined reference to
`fltk::Widget::state(bool)'
./CCUI_BesucherAlbumDlg.o: In function
`CCUI_BesucherAlbumDlg::BA_right_cbi(fltk::Button*)':
../CCUI_BesucherAlbumDlg.cxx:(.text+0x70c): undefined reference to
`fltk::Widget::state(bool)'
./CCUI_BesucherAlbumDlg.o: In function
`CCUI_BesucherAlbumDlg::BA_left_cbi(fltk::Button*)':
../CCUI_BesucherAlbumDlg.cxx:(.text+0x86c): undefined reference to
`fltk::Widget::state(bool)'
./CCUI_CommFuncs.o:../CCUI_CommFuncs.cxx:(.text+0xe4): more undefined
references to `fltk::Widget::state(bool)' follow
collect2: ld returned 1 exit status
make: *** [CCUI] Fehler 1
I did the design of my App with fluid2. The UI-files which are generated by
fluid2 are the reason why
The linker get these errors.
Does anyone of you guys have a hint or a solution to my problem?
Sincerely yours
Michael
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk