View previous topic :: View next topic |
Author |
Message |
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Wed Mar 30, 2011 3:32 am Post subject: Compiled Examples don't work |
|
|
All right, next problem >.>
I figured I'd start a new thread since this doesn't have anything to do with my old one.
I (now successfully) used dsss to build gtkd and used "dsss install" to install it. Afterwards I compiled the examples by "dsss build demos". So far, so good.
When I actually start for example TestWindow.exe or any other compiled example, I get an error message saying
"Procedure Entry Point g_malloc0_n wasn't found in the DLL libglib-2.0-0.dll",
literally translated into English. To be honest, I haven't found any dlls anywhere, so I have no idea where the programs tries to find any. |
|
Back to top |
|
|
Epileg
Joined: 10 Sep 2009 Posts: 77
|
Posted: Wed Mar 30, 2011 5:23 am Post subject: |
|
|
Did You install GTK+ for Windows?
As You can see on GtkD home page, windows need GTK+ Runtime to properly run GtkD programs.
Download and install the newest one: GTK2 Runtime
Best regards, |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Wed Mar 30, 2011 6:19 am Post subject: |
|
|
I did install it, and I set my Path variable to include it too. I'll try reinstalling, though.
EDIT: I reinstallt, but it didn't change anything. I still get the same error. |
|
Back to top |
|
|
Epileg
Joined: 10 Sep 2009 Posts: 77
|
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Wed Mar 30, 2011 1:13 pm Post subject: |
|
|
I tried compiling it with bud/build, added the import paths etc and my own example compiles perfectly fine, though it also did beforehand using DSSS.
However, I still get the same error message upon execution. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Wed Mar 30, 2011 3:29 pm Post subject: |
|
|
Building gtkD under wine and using it with the runtime linked on the gtkD home page, seem to work as it should.
I don't know whats causing the error but g_malloc0_n should be in the glib dll.
One thing you could try is the runtime bundle hosted on the gtk ftp: gtk+-bundle_2.22.0-20101016_win32.zip, it's larger then the one linked on the gtkD main page. And it isn't a installer so you'll have to unzip it someware and ead the bin folder to the path. |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Thu Mar 31, 2011 12:38 am Post subject: |
|
|
I just noticed this gtk+ is 32bit. Since I use a 64bit Vista, do I need to search for a 64bit gtk+ runtime? And no, I have no idea whether the example compiled to 32 or 64 bit.
EDIT: I tried it using a 64bit runtime, but that failed, too, probably because the example is compiled to 32bit.
The libglib is actually existent in the runtime folder, so yea... I have no idea why it doesn't work :<
I also tried the 2.16 gtk+ bundle, to no avail. The "gtk-demo.exe" inculded in either bundle to verify that gtk+ works executes perfectly fine though. No error, no nothing. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Thu Mar 31, 2011 2:31 pm Post subject: |
|
|
dmd only generates 32bits binaries, so you'll need the 32bits runtime.
Did you also try the runtime linked in my previous post? |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Thu Mar 31, 2011 11:19 pm Post subject: |
|
|
Yes, I did. Same result.
If I start e.g. "HelloWorld.exe" through the command line, I get following message in addition to the previous one:
"object.Exception: Library load failed: libgtk-win32-2.0-0.dll"
Perhaps that means just the same, although the filenames are different... |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Fri Apr 01, 2011 2:42 pm Post subject: |
|
|
That last error is from GtkD, because it can't find the dll, maybe because the path wasn't setup correctly. |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Sat Apr 02, 2011 8:46 am Post subject: |
|
|
I copied one of the demos into the gtk2\bin folder - from there it works, no errors.
So apparently my path isn't setup correctly - but how do I need to set it up? We are talking about the Path environment variable, right? |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sat Apr 02, 2011 12:39 pm Post subject: |
|
|
Yes the path environment variable.
It should contain the bin folder of the gtk installation, for example: "c:\Program files\gtk\bin" |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Sat Apr 02, 2011 2:48 pm Post subject: |
|
|
I already did that, right from the beginning :/
I crosschecked serveral times, my PATH is set, it should be fine. It still doesn't work though. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sun Apr 03, 2011 10:51 am Post subject: |
|
|
The order in witch gtkD searches for the dll is the default windows search behavior as described on mdsn:
http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx
If the example works when it is in the same directory as the libraries and the path is set correctly something go's worn between point 1 and point 6 of the mdsn article.
Alternatively if the GTK_BASEPATH environment variable is set GtkD only searchers in the directory specified by that Environment variable. |
|
Back to top |
|
|
Drohelf
Joined: 28 Mar 2011 Posts: 15 Location: DE
|
Posted: Sun Apr 03, 2011 1:08 pm Post subject: |
|
|
Soooooo what do I do, besides reinstalling Windows? >.>
I set a new environment variable called GTK_BASEPATH as you said before - now I don't a popup error mesage anymore but still the "object.Exception: "-error I already got beforehand when starting through the commandline. |
|
Back to top |
|
|
|