swig error : Unrecognized option


23-01-2006 21:59:27

Hi, Im trying to build pyogre-1.0.6-0 and have already the debian package of libogre-dev 1.0.6-1 installed.

The problem is, that "python setup.py install" (as well as ... build) gives this:


Package CEGUI was not found in the pkg-config search path.
Perhaps you should add the directory containing `CEGUI.pc'
to the PKG_CONFIG_PATH environment variable
Package 'CEGUI', required by 'CEGUI-OGRE', not found
swigging pyogre/cegui/cegui.i to pyogre/cegui/cegui_wrap.cxx
swig -python -c++ -modern -Ipyogre/cegui -Ipyogre/ogre -o pyogre/cegui/cegui_wrap.c
swig error : Unrecognized option
Use 'swig -help' for available options.
error: command 'swig' failed with exit status 1

My swig version is 1.3.27-1 (also from debian). Looking at the manpage of swig it seems it does not understand the "-modern" option. Do I need another (oder?) version of swig?
Or does that have anything to do with the CEGUI messages?

Sorry if this is answered somewhere but I searched s few times and couldnt find anything.



23-01-2006 23:32:58

I don't know about the urecognized option error you're getting, but I had to deal with the "can't find CEGUI.pc" error as well, on my ubuntu (i.e. debian-based) system. It turned out that the pkg-config system that comes with ubuntu was too old (0.2.0), and I had to manually install the latest from sources (wasn't hard), in addition to setting the PKG_CONFIG_PATH shell to point to /usr/local/lib/pkgconfig.

See the following thread:

Let us know if you successfully compile pyogre on your debian system. I've been having trouble myself: http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=332


24-01-2006 06:07:33

Henning wrote

My swig version is 1.3.27-1 (also from debian). Looking at the manpage of swig it seems it does not understand the "-modern" option. Do I need another (oder?) version of swig?

No the version your using should be fine.

As SuperElectric says looks like cegui insn't installed or your PKG_CONFIG_PATH isn't set.
On debian I'm using the packages for ogre 1.0.6 and cegui 0.4.1 packages as per fog's post here:


24-01-2006 06:08:51

Thanks for your hint, it turned out that the cegui staff was the problem.

Heres a short debian "tutorial" of what I did for pyogre 1.0.6-0:
Ill give exact version of used files, of course you are free to use your brain and/or a bit of trial-and-error to find out which other version do:

Get and install the following packes with apt:
libcegui-mk2-dev 0.4.1-1
libogre-dev 1.0.6-1
gcc-4.0 (I dont know if gcc is really needed)
g++-4.0 (A 3.* version may do, too)
pkg-config 0.20-1 (yes, debian seems to have the newest one!)
swig 1.3.27-1

Note that I have unstable and unofficial sources.list-entries so you may not find all these packes in the debian mainstream.

These should do. libogre-dev should depend on libogre so that will be automatically installed for you.
Now download pyogre 1.0.6-0 somewhere, extract it, and type "python setup.py install", that should run without errors.

if you now execute python (no need to be root anymore) and type "import pyogre" and you get no error you have suscessfully installed pyogre, have fun!