FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiled Examples don't work
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Wed Mar 30, 2011 3:32 am    Post subject: Compiled Examples don't work Reply with quote

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
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Wed Mar 30, 2011 5:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Wed Mar 30, 2011 6:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Wed Mar 30, 2011 10:23 am    Post subject: Reply with quote

I've compiled gtkd in wxp with bud/build, and compiled/run clock example without problems

I used the description in the 5th post at http://www.dsource.org/forums/viewtopic.php?t=5129&sid=5141fbb5e922e69a2cfc6442d69eeaab
Back to top
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Wed Mar 30, 2011 1:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Wed Mar 30, 2011 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Thu Mar 31, 2011 12:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Thu Mar 31, 2011 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Thu Mar 31, 2011 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Fri Apr 01, 2011 2:42 pm    Post subject: Reply with quote

That last error is from GtkD, because it can't find the dll, maybe because the path wasn't setup correctly.
Back to top
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Sat Apr 02, 2011 8:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sat Apr 02, 2011 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Sat Apr 02, 2011 2:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sun Apr 03, 2011 10:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Drohelf



Joined: 28 Mar 2011
Posts: 15
Location: DE

PostPosted: Sun Apr 03, 2011 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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