Re: [pygccxml-development] Re : Re : Re : Compilation problem
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-06-05 18:43:53
|
On Thu, Jun 5, 2008 at 6:07 PM, Vincent Ferries <vin...@gm...> wrote: > I successfully runned the example pyeasybmp on my platform. > I can run the examples from start to end without any problem. > I generate my .so libs with the same environment variables, and the > same scontruct file. > > I tried to make a lib of a very simple file with no dependency. > I still encounter the same problem... > > The only difference I see is that there are just .h files in the > pyeasybmp example and that I have a .h and a .cpp file. > Does it influence the results? > How can I do it then? > > Here is the err.h I'm trying to wrap, the error message is still the > same (it follows) > > > > > // > // Copyright 2005-2008 Renaud Sizaire > // > // This file is part of FeResPost. > // > // FeResPost is free software; you can redistribute it and/or modify > // it under the terms of the GNU General Public License as published by > // the Free Software Foundation; either version 2 of the License, or > // (at your option) any later version. > // > // FeResPost is distributed in the hope that it will be useful, > // but WITHOUT ANY WARRANTY; without even the implied warranty of > // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > // GNU General Public License for more details. > // > // You should have received a copy of the GNU General Public License > // along with FeResPost; if not, write to the Free Software > // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > // > > #ifndef ERR_H > #define ERR_H > > #include <iostream> > #include <stdexcept> > #include <string> > > namespace postLib { > > class err { > > private : > > std::string functionName ; > std::string fileName ; > int lineNumber ; > std::string message ; > > static bool Ok ; > > public : > > err(void) ; > err(std::string fuName,std::string fiName,int liNumber,std::string msg) ; > err(std::string fiName,int liNumber,std::string msg) ; > err(const err &in) ; > ~err(void) ; > > void write(std::ostream &out) const ; > void exec(std::ostream &out) ; > void exec(void) ; > > static void setOk(bool) ; > static bool getOk(void) ; > > static void flushStdStreams(void) ; > > } ; > > } > > #define errThrow(a,b) { \ > err::flushStdStreams(); \ > err brol(a,__FILE__,__LINE__,b); \ > brol.write(std::cerr); \ > throw(brol); \ > } > > #define errWrite(a,b) { \ > err::flushStdStreams(); \ > err (a,__FILE__,__LINE__,b).exec(); \ > err::setOk(false); \ > } > > #define catchAll(a,b) catch(err) { \ > err::flushStdStreams(); \ > std::cerr << "Error caught in : " << __FILE__ << ":" << __LINE__ << endl ; \ > std::cerr << " in function : " << a << endl ; \ > std::cerr << " with message : " << b << endl ; \ > err brol(a,__FILE__,__LINE__,b) ; \ > throw(brol) ; \ > } \ > catch(std::out_of_range) { \ > err::flushStdStreams(); \ > std::cerr << "Error caught in : " << __FILE__ << ":" << __LINE__ << endl ; \ > std::cerr << " in function : " << a << endl ; \ > std::cerr << " with message : " << b << endl ; \ > std::cerr << " error type : std::out_of_range" << endl ; \ > err brol(a,__FILE__,__LINE__,b) ; \ > throw(brol) ; \ > } \ > catch(std::bad_alloc) { \ > err::flushStdStreams(); \ > std::cerr << "Error caught in : " << __FILE__ << ":" << __LINE__ << endl ; \ > std::cerr << " in function : " << a << endl ; \ > std::cerr << " with message : " << b << endl ; \ > std::cerr << " error type : std::bad_alloc" << endl ; \ > err brol(a,__FILE__,__LINE__,b) ; \ > throw(brol) ; \ > } \ > catch(...) { \ > err::flushStdStreams(); \ > std::cerr << "Error caught in : " << __FILE__ << ":" << __LINE__ << endl ; \ > std::cerr << " in function : " << a << endl ; \ > std::cerr << " with message : " << b << endl ; \ > std::cerr << " error type : unknown" << endl ; \ > err brol(a,__FILE__,__LINE__,b) ; \ > throw(brol) ; \ > } > > #endif > > > > > Traceback (most recent call last): > File "test.py", line 4, in ? > import ferespost > ImportError: /people/ferries/ferespost/unittests/ferespost.so: > undefined symbol: _ZN7postLib7errC1ERKS0_ > > > Thanks again... I think the error is not related to Boost.Python. Did you tried to create small executable that uses the library you wrap? I guess you will get same error. May it worse to take this error to ferespost developers? Did you try to adjust LD_LIBRARY_PATH, so it will contain path to ferespost so file? If ferespost supports static linakge, maybe it worse to try that mode? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |