PDA

View Full Version : Can't compile example on Ubuntu



DeusIX
05-02-2013, 02:00 PM
Hi.

I don't know what is wrong. I followed the Linux install example and all was fine until I tried to run the examples
This is what I get:


:~/Downloads/ClanLib/ClanLib-2.3.6/Examples/Display/Basic2D$ make
g++ `pkg-config --cflags clanApp-2.3 clanDisplay-2.3 clanCore-2.3 clanSWRender-2.3 clanGL-2.3 clanGL1-2.3` -pthread -c Sources/basic2d.cpp -o Sources/basic2d.o
Package clanApp-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanApp-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanApp-2.3' found
Package clanDisplay-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanDisplay-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanDisplay-2.3' found
Package clanCore-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanCore-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanCore-2.3' found
Package clanSWRender-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanSWRender-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanSWRender-2.3' found
Package clanGL-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanGL-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanGL-2.3' found
Package clanGL1-2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `clanGL1-2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'clanGL1-2.3' found
In file included from Sources/basic2d.cpp:30:0:
Sources/precomp.h:3:26: fatal error: ClanLib/core.h: No such file or directory
compilation terminated.
make: *** [Sources/basic2d.o] Error 1
:~/Downloads/ClanLib/ClanLib-2.3.6/Examples/Display/Basic2D$

I tried this too: export PKG_CONFIG_PATH=/usr/lib/pkgconfig/, but nothing changed.

rombust
05-03-2013, 06:57 AM
./autogen.sh
./configure --prefix=/usr
make -j9
sudo make install

<--- If configure does not contain "--prefix=/usr" clanlib will install into /usr/local/ instead, and by default Ubuntu paths don't contain this

DeusIX
05-03-2013, 10:53 AM
Thanks.

I did use that --prefix=/usr.
But instead of "make -j9" I only typed "make". Maybe that was the cause? I don't know what -j9 does.

Now I'm going to play with the examples :D

Judas
05-03-2013, 03:33 PM
-j9 just means that it should compile 9 .cpp files simultaneously. It speeds up the compilation (why make still defaults to 1 process in 2013 is a mystery).