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

Compilation issues on Linux -- patch, makefile; can't link

 
Post new topic   Reply to topic     Forum Index -> MinWin
View previous topic :: View next topic  
Author Message
dhasenan



Joined: 03 Feb 2005
Posts: 73
Location: New York

PostPosted: Sun Jan 07, 2007 6:40 pm    Post subject: Compilation issues on Linux -- patch, makefile; can't link Reply with quote

Hi--

Minwin doesn't have a Linux makefile. With some modification, I got the makefile to work, mainly by copying from other makefiles.

After that, it took some modification to make the rest of it compile. The only real issue was casting arrays to pointers.

Here's the difference in the source:
Code:

Index: dialog.d
===================================================================
--- dialog.d    (revision 32)
+++ dialog.d    (working copy)
@@ -401,7 +401,7 @@
         // TODO: title?
         GtkWidget* d = gtk_message_dialog_new(owner.peer,
                         GtkDialogFlags.GTK_DIALOG_DESTROY_WITH_PARENT,
-                        type,buttons,text);
+                        type,buttons,cast(char*)text);
         gtk_dialog_run(cast(GtkDialog*)d);
         gtk_widget_destroy(d);
     }
@@ -440,7 +440,7 @@
             GtkFileFilter* f = gtk_file_filter_new();
             gtk_file_filter_set_name(f,toStringz(filt.description));
             foreach( char[] ext; filt.extensions) {
-                gtk_file_filter_add_pattern(f,"*."~ext);
+                gtk_file_filter_add_pattern(f,cast(char*)("*."~ext));
             }
             gtk_file_chooser_add_filter(fc,f);
         }
Index: listbox.d
===================================================================
--- listbox.d   (revision 32)
+++ listbox.d   (working copy)
@@ -82,7 +82,7 @@
                 args[0] = 0;
                 args[1] = cast(int)toStringz(s);
                 args[2] = -1;
-                gtk_list_store_set_valist(model,&iter,args);
+                gtk_list_store_set_valist(model,&iter,cast(int*)args);
             }
             peer = gtk_tree_view_new_with_model(cast(GtkTreeModel*)model);
             g_object_unref(cast(GObject*)model);



The Linux makefile is here.

Now. This allows you to compile the library. Linking against it, not so much. When trying to compile the samples, the linker complains about just about every line in the file. These are enumerated here.

Any ideas what's wrong?
Back to top
View user's profile Send private message AIM Address
lindquist



Joined: 14 Sep 2006
Posts: 55
Location: Copenhagen, Denmark

PostPosted: Mon Jan 08, 2007 1:40 pm    Post subject: Reply with quote

Hi and thanx for testing Smile
I just got home from two weeks vacation in Brazil, so nothing has happened in that time.

I'm currently using Windows and I must admit I hate Cygwin, which so is the only way I have been able to test the GTK backend.
I'm trying to come up with a way to make it work with MinGW and GDC but I'm not quite there yet.

The patch will definitely be applied, but I have been considering dropping the makefiles from the repository as 1) I hate makefiles, and 2) bud exists!

Currently MinWin has some pretty serious problems. Some things are pretty inconsistant across backends, some things simply dont work at all, either being broken or just not implemented.
So far I have been fixing things if I could find the time and knew how to, otherwise I have filed tickets in the Trac environment.

I don't want to discourage you from trying MinWin but it's not ready for real world use yet. If you're still not scared away I would love some help in identifying issues/inconsistencies and also patches or tickets will be VERY MUCH appreciated.

But first... Give me a few days to catch up on D and get back into the game Wink
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Mon Jan 08, 2007 3:10 pm    Post subject: Reply with quote

I tried I think MinWin rev32 on Kubuntu 6.10 PPC with gdc 0.21, and the samples worked fine.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
sylverpyro



Joined: 23 May 2006
Posts: 28

PostPosted: Tue Jan 09, 2007 10:26 pm    Post subject: Regarding build instructions Reply with quote

Quote:
The patch will definitely be applied, but I have been considering dropping the makefiles from the repository as 1) I hate makefiles, and 2) bud exists!


If this is the case, which file are we supposed to build to compile the library? Or are the source files simply meant to be linked in individually? A build.cfg file would be nice too.

I did just successfully compile all.d (I am guessing this is the file that includes all of the other files) using Build (CMDLINE=-I./docs/ in a build.cfg file was necessary to link in the minwin.apt.ect files in docs/) on OS X using GDC based on dmd 1.00.
Back to top
View user's profile Send private message
Baffo32



Joined: 19 Jan 2007
Posts: 1

PostPosted: Fri Jan 19, 2007 6:21 pm    Post subject: Reply with quote

this works fine for me:
Code:

bud -lib -Tlibminwin_gtk.a all.d -I.. -version=GTK -full -clean
cd samples
make -f linux.mak
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MinWin All times are GMT - 6 Hours
Page 1 of 1

 
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