Re: [pygccxml-development] Compilation problem
Brought to you by:
mbaas,
roman_yakovenko
From: Vincent F. <vin...@gm...> - 2008-06-04 15:51:10
|
I tried to comment all the virutal method definitions in my generated .cpp file. If I understand what was said on your link, the linker makes dynamic links for virtual functions which are not redefined in the same file while compiling which causes errors on runtime if it doesn't find them, just like in my case. But without any virtual function left, it should work. I compiled again and still have the same error when importing the module... 2008/6/4, Vincent Ferries <vin...@gm...>: > 2008/6/4, Gustavo Carneiro <gjc...@gm...>: >> On 04/06/2008, Vincent Ferries <vin...@gm...> wrote: >>> >>> I forgot two words (can't use copy/paste) . >>> Here is the error. >>> >>> ImportError: /people/ferries/ferespost/unittests/ferespost.so: undefined >>> symbol: >>> _ZTIN7postLib7nastran8dataBaseE >>> >>> Any idea of the source of the problem? >> >> >> $ c++filt -t _ZTIN7postLib7nastran8dataBaseE >> typeinfo for postLib::nastran::dataBase >> >> See: >> >> http://www.dbforums.com/archive/index.php/t-352689.html >> >> In which they say one of the possible reasons is the class missing the >> implementation of a virtual method. >> >> Thanks in advance. >>> >>> >>> 2008/6/4, Vincent Ferries <vin...@gm...>: >>> > Ok, I have it working now, just a problem writting the lib name. >>> > But when I try to launch it with the simplest possible example : >>> > >>> > import ferespost >>> > >>> > dataBase = ferespost.dataBase() >>> > >>> > >>> > I get the following error : >>> > >>> > Traceback (most recent call last): >>> > File "test.py", line 1, in ? >>> > import ferespost >>> > ImportError: /people/ferries/ferespost/unittests/ferespost.so: >>> > _ZTIN7postLib7nastran8dataBaseE >>> > >>> > Any idea of what's going wrong? >>> > >>> > This dataBase is defined in the generated .cpp file as >>> > postLib::nastran::dataBase >>> > >>> > 2008/6/4, Vincent Ferries <vin...@gm...>: >>> >> Here is the output : >>> >> >>> >> scons: Reading SConscript files ... >>> >> scons: done reading SConscript files. >>> >> scons: Building targets ... >>> >> g++ -o generated/ferespost.os -c -fPIC -I/usr/lib -I. -ISRC >>> >> -I/usr/include/python2.4 generated/ferespost.cpp >>> >> scons: done building targets. >>> >> >>> >> >>> >> I don't understand why ferespost.os is in the generated command line, >>> >> nor why the .so isn't generated. >>> >> >>> >> 2008/6/4, Roman Yakovenko <rom...@gm...>: >>> >>> On Wed, Jun 4, 2008 at 1:42 PM, Vincent Ferries >>> >>> <vin...@gm...> wrote: >>> >>>> Yes, but in my case it's called .os and not .so and it doesn't >>> >>>> correspond to a share library (see the file command result). >>> >>>> I've double looked my scontruct file and don't catch the error. >>> >>> >>> >>> This is what I missed. I guess for some reason "link" step didn't >>> >>> run. >>> >>> Can you post scons output? >>> >>> >>> >>> >>> >>> -- >>> >>> Roman Yakovenko >>> >>> C++ Python language binding >>> >>> http://www.language-binding.net/ >>> >>> >>> >> >>> > >>> >>> ------------------------------------------------------------------------- >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services for >>> just about anything Open Source. >>> http://sourceforge.net/services/buy/index.php >>> _______________________________________________ >>> pygccxml-development mailing list >>> pyg...@li... >>> https://lists.sourceforge.net/lists/listinfo/pygccxml-development >>> >> >> >> >> -- >> Gustavo J. A. M. Carneiro >> INESC Porto, Telecommunications and Multimedia Unit >> "The universe is always one step beyond logic." -- Frank Herbert >> > |