View previous topic :: View next topic |
Author |
Message |
smallfish
Joined: 08 Dec 2009 Posts: 1
|
Posted: Tue Dec 22, 2009 3:19 am Post subject: Blocks, gtkD, and the D Language |
|
|
I've tried searching the Ubuntu Forums and have read the FAQs. I've already tried asking this in the Code::Blocks forum, but the topic got locked (because they said it was unrelated to C::B IDE - it is a compiler/linker issue).
I'm running Ubuntu 8.10 with the Code::Blocks IDE. I installed the gtkD library using make and sudo make install. I linked the resulting gtkD library (libgtkd.a) to the C::B Linker Settings under Project > Build Options > Linker Settings, and I added the gtkD folder to the C::B Search Directories tab. I also have the libdl.a and the libc.a linked in.
The program compiles with the warning:
Code: | Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking.The program executes, but instead of showing a window, it displays in the terminal: |
Code: | Segmentation FaultHere's the code I'm trying to run in C::B (it's from the examples on the gtkD Dsource website): |
Code: | import gtk.MainWindow;
import gtk.Label;
import gtk.Main;
void main(char[][] args)
{
Main.init(args);
MainWindow win = new MainWindow("Hello World");
win.setDefaultSize(200, 100);
win.add(new Label("Hello World"));
win.showAll();
Main.run();
} |
I'm guessing that I need to install another version of the glibc - would anyone know of another version of glibc used for linking? I have the glibc-core version 2.8 installed already through synaptic. I tried searching in the Ubuntu lib packages
Thanks in advance! |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Tue Dec 22, 2009 7:08 am Post subject: |
|
|
ld and libc are normally linked dynamically, does code block call the linker or does it leave it to the compiler, i'm guessing the later since it isn't complaining about other missing libs. so you can drop libc.a and only list libdl.so. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|