Re: First Compilation

Mike Melanson <[email protected]> Thu, 31 Jul 2003 22:00:30 -0600 (MDT)
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <[email protected]>
On Thu, 31 Jul 2003, Mike Melanson wrote:

> 	I will continue to do battle with the demo programs. I want a

	A little more info on the demo programs:

* When I try compiling from the top level:

[melanson@x-wing libstk]$ make
make  all-recursive
make[1]: Entering directory `/home/build/libstk'
Making all in libstk
make[2]: Entering directory `/home/build/libstk/libstk'
make[2]: *** No rule to make target `test_app.cpp', needed by
`test_app.o'.  Stop.
make[2]: Leaving directory `/home/build/libstk/libstk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/libstk'
make: *** [all] Error 2

So the build system is apparently and mistakenly trying to build
test_app.cpp inside libstk/, when the source resides in tests/.


* When I switch to tests/ for the build:

[melanson@x-wing libstk]$ cd tests/
[melanson@x-wing tests]$ make
/bin/sh ../libtool --mode=link g++3.2 -Wall -g -O2   -o test_app
test_app.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread
-lboost_signals -lfreetype -lz -I../libstk ../libstk/.libs/libstk.a
g++3.2 -Wall -g -O2 -o test_app test_app.o -Wl,-rpath -Wl,/usr/local/lib
-I../libstk  -L/usr/local/lib /usr/local/lib/libSDL.so -lm
-L/usr/local/kde/lib -ldl -lartsc -L/usr/X11R6/lib -lX11 -lXext -ldl
-lpthread -lboost_signals /usr/local/lib/libfreetype.so -lz
../libstk/.libs/libstk.a -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath
-Wl,/usr/local/lib
test_app.o: In function `scroll_slot(boost::shared_ptr<stk::scroll_model>,
int)':
/usr/local/include/boost/shared_ptr.hpp:237: undefined reference to
`stk::scroll_model::begin() const'
/usr/local/include/boost/shared_ptr.hpp:237: undefined reference to
`stk::scroll_model::vis_size() const'
/usr/local/include/boost/shared_ptr.hpp:237: undefined reference to
`stk::scroll_model::size() const'
/usr/local/include/boost/shared_ptr.hpp:237: undefined reference to
`stk::scroll_model::begin() const'
/usr/local/include/boost/shared_ptr.hpp:237: undefined reference to
`stk::scroll_model::begin(int)'
test_app.o: In function `main':
/home/build/libstk/tests/test_app.cpp:85: undefined reference to
`stk::event_system_sdl::create()'
test_app.o: In function `main':
/usr/local/include/boost/shared_ptr.hpp:152: undefined reference to
`stk::rectangle::rectangle[in-charge](int, int, int, int)'
/usr/local/include/boost/shared_ptr.hpp:152: undefined reference to
`stk::surface_sdl::create(stk::rectangle const&)'
test_app.o: In function `main':
/usr/local/include/boost/detail/lwm_pthreads.hpp:76: undefined reference
to `stk::application::create(boost::shared_ptr<stk::surface>,
boost::shared_ptr<stk::event_system>)'
/usr/local/include/boost/detail/lwm_pthreads.hpp:76: undefined reference
to `stk::state::create(boost::shared_ptr<stk::application>)'
  [...]
  [...]
  [...]
  [...]

And it goes on for hundreds and hundreds of lines. Let's start small.  In
the build above, you will notice '-I../libstk' added. I had to hack up the
Makefile and Makefile.in files to do that. Didn't make a difference. It's
just that it seemed to me like it couldn't find the header files for all
those classes. Then again, I suppose if that were true, the compiler
would've thrown warnings about not finding header files and given up.

	I'm through fighting with the library for tonight. Hope the above
data is useful...
--
	-Mike Melanson