Thread: [Fxruby-users] Re: Build problem with FXRuby on Debian
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@kn...> - 2003-11-24 13:46:35
|
On Nov 24, 2003, at 3:52 AM, cj...@ma... wrote: > I have Ruby 1.8.0 on Debian, and built FXRuby-1.0.27 last night. > In irb, require 'fox' yields: > > LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so: > undefined symbol: _ZN5FXApp9metaClassE - > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so > from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so > > c++filt says _ZN5FXApp9metaClassE is FXApp::metaClass. > > Any idea why this symbol is undefined? > Please see the topic "Cannot load library" under the "Things That Can Go Wrong" section of this page: http://www.fxruby.org/doc/build.html I am guessing that the FOX library (libFOX.so) is installed in a directory that isn't in the load path for dynamic libraries. Hope this helps, Lyle |
From: <ly...@kn...> - 2003-11-24 22:03:49
|
On Tue, 25 Nov 2003 08:45:35 +1100, cj...@ma... wrote : > > Please see the topic "Cannot load library" under the "Things That Can > > Go Wrong" section of this page: > > I have done, it isn't that problem. OK. Can you show me the output of: ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so on your system? |
From: <ly...@kn...> - 2003-11-24 22:49:23
|
On Tue, 25 Nov 2003 09:07:15 +1100, cj...@ma... wrote : > > OK. Can you show me the output of: > > ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so > > on your system? > > $ ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox.so > libFOX-1.0.so.0 => /usr/lib/libFOX-1.0.so.0 (0x404dc000) <snip> The symbol it claims is missing (FXApp::metaClass) is a static member of the FXApp class, and it is declared by the FXDECLARE macro that appears in the FXApp class definition: class FXAPI FXApp : public FXObject { FXDECLARE(FXApp) ... and so on ... }; The FXDECLARE macro itself is defined in FXObject.h: #define FXDECLARE(classname) \ public: \ struct FXMapEntry { ... }; \ static const FXMetaClass metaClass; \ ... and so on ... So I can't see why this would be missing, unless something went wrong when building the FOX library (libFOX.so). Just curious, can you run any of the FOX example programs (i.e. those for the C++ library)? They are found under the "tests" subdirectory of the FOX source code distribution. Hope this helps, Lyle |
From: <cj...@ma...> - 2003-11-24 23:16:46
|
> The symbol it claims is missing (FXApp::metaClass) is a static member of Thanks Lyle, I'll chase it. None of the examples work, since I can't even "require 'fox'". I didn't get any compile errors, but at least I have more idea where to look. Will let you know. > The FXDECLARE macro itself is defined in FXObject.h: Yup, but this doesn't define the static, just declares it. Where are these statics defined? Clifford Heath. |
From: Lyle J. <ly...@kn...> - 2003-11-25 02:37:02
|
On Nov 24, 2003, at 5:16 PM, cj...@ma... wrote: >> The FXDECLARE macro itself is defined in FXObject.h: > > Yup, but this doesn't define the static, just declares it. Where are > these > statics defined? Oh, yes. The FXIMPLEMENT macro (also found in FXObject.h) is the counterpart of the FXDECLARE macro, and you should find the statement: FXIMPLEMENT(FXApp, FXObject, ...) somewhere in FXApp.cpp. This is the one that actually defines FXApp::metaClass and the other declarations from FXDECLARE. |
From: Lyle J. <ly...@kn...> - 2003-11-25 13:59:51
|
On Nov 25, 2003, at 2:10 AM, cj...@ma... wrote: >> FXIMPLEMENT(FXApp, FXObject, ...) >> somewhere in FXApp.cpp. This is the one that actually defines >> FXApp::metaClass and the other declarations from FXDECLARE. > > Ok, but I can't see FXApp.cpp anywhere - FXRbApp.cpp is there though. > I assume it's meant to be built from FXApp.i (though I don't have SWIG > installed), because it isn't in the source archive. Is this a simple > omission? FXApp is a class from the original FOX library (libFOX.so) and so its source files (FXApp.cpp and FXApp.h) are found in the FOX source code tree. Go to the directory where you originally built FOX and look under the 'src' directory, e.g. /home/cjh/fox-1.0.42/src/FXApp.cpp Hope this helps, Lyle |
From: <cj...@ma...> - 2003-11-25 21:57:37
|
> FXApp is a class from the original FOX library Just worked that out - and that I had a dodgey Debian libfox and libfox-dev package installed. Removed them, and reinstalled the current ones (libfox1.0 and libfox1.0-dev) and it all works. I guess the Debian package maintainer screwed up the updates so I didn't have the current versions. Sorry for all the noise, I'll be quiet now. |
From: Lyle J. <jl...@cf...> - 2003-11-25 22:21:45
|
cj...@ma... wrote: > Sorry for all the noise, I'll be quiet now. No problem, glad we were able to get it resolved! |