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

probs w. DFL compiled w. gdc

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Kwez



Joined: 03 Oct 2006
Posts: 12

PostPosted: Tue Oct 10, 2006 10:58 am    Post subject: probs w. DFL compiled w. gdc Reply with quote

hi,
I built a version of DFL w. gdc / MinGW.

for some controls (eg checkbox, radiobutton, groupbox, listbox...),
the text displays black on black.
I tried to figure it out, but had no success.

the same DFL sources work fine w. DMD.

any ideas on what the problem could be, anybody ?
thank you
Philippe
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Oct 11, 2006 10:20 pm    Post subject: Re: probs w. DFL compiled w. gdc Reply with quote

Sorry, I am even unable to get DFL compiled using MinGW-GDC. I get several errors such as the following:
Code:
C:/gdc/bin/../lib/gcc/mingw32/3.4.5/../../../libgphobos.a(com.o): undefined reference to `IID_IUnknown'
C:/gdc/bin/../lib/gcc/mingw32/3.4.5/../../../libgphobos.a(socket.o): undefined reference to `WSAStartup@8'
C:/gdc/bin/../lib/gcc/mingw32/3.4.5/../../../libgphobos.a(socket.o): undefined reference to `getprotobyname@4'
C:/gdc/bin/../lib/gcc/mingw32/3.4.5/../../../libgphobos.a(socket.o): undefined reference to `connect@12'
and I am using -luuid and -lws2_32 (also tried -lwsock32).
Back to top
View user's profile Send private message
Kwez



Joined: 03 Oct 2006
Posts: 12

PostPosted: Thu Oct 12, 2006 11:01 am    Post subject: Reply with quote

oh !
that one .. yeah, really fun.

here's how I got it to link (all about libs order):
the trick was to manually put gphobos after dfl,
but before ws2_32, uuid etc..

<Add library="dfl" />
<Add library="gphobos" />
<Add library="ws2_32" />
<Add library="user32" />
<Add library="gdi32" />
<Add library="comctl32" />
<Add library="advapi32" />
<Add library="comdlg32" />
<Add library="ole32" />
<Add library="olepro32" />
<Add library="uuid" />
<Add library="shell32" />

thx for looking into the problem
Philippe
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Oct 12, 2006 4:02 pm    Post subject: Reply with quote

Kwez wrote:
here's how I got it to link (all about libs order):
the trick was to manually put gphobos after dfl,
but before ws2_32, uuid etc..
Thanks, that worked.

I just posted a snapshot that fixes this GDC black background issue for all the controls except ListView, I'm not sure why it's still happening with it.
- Chris
Back to top
View user's profile Send private message
Kwez



Joined: 03 Oct 2006
Posts: 12

PostPosted: Fri Oct 13, 2006 10:28 am    Post subject: Reply with quote

great,
thx, I'm checking it out right now
have a nice week-end
Phil
Back to top
View user's profile Send private message
Dune



Joined: 22 Nov 2006
Posts: 6

PostPosted: Tue Dec 05, 2006 3:36 pm    Post subject: Reply with quote

Are DFL libs available for GDC?

If yes: where can they be downloaded?
If no: how to get DFL compiled with GDC?

Thanks
Dune
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Dec 06, 2006 6:10 am    Post subject: Reply with quote

Dune wrote:
Are DFL libs available for GDC?

If yes: where can they be downloaded?
If no: how to get DFL compiled with GDC?

Thanks
Dune


No, there hasn't been much interest in GDC with DFL that I know of. However, here is what I tested it with, you may need to add or remove files depending on your version:
Code:
gdc test.d dfl/all.d dfl/application.d dfl/base.d dfl/button.d dfl/clipboard.d dfl/collections.d dfl/colordialog.d dfl/com.d dfl/combobox.d dfl/commondialog.d dfl/control.d dfl/data.d dfl/drawing.d dfl/environment.d dfl/event.d dfl/filedialog.d dfl/folderdialog.d dfl/fontdialog.d dfl/form.d dfl/groupbox.d dfl/label.d dfl/listbox.d dfl/listview.d dfl/menu.d dfl/messagebox.d dfl/notifyicon.d dfl/panel.d dfl/picturebox.d dfl/registry.d dfl/richtextbox.d dfl/splitter.d dfl/socket.d dfl/tabcontrol.d dfl/textbox.d dfl/timer.d dfl/tooltip.d dfl/treeview.d dfl/usercontrol.d dfl/utf.d dfl/winapi.d dfl/wincom.d -I. -lgphobos -lws2_32 -lole32 -lolepro32 -lgdi32 -luuid -ladvapi32 -lcomctl32 -lcomdlg32

If you can come up with something more user friendly, please post it.
Back to top
View user's profile Send private message
Dune



Joined: 22 Nov 2006
Posts: 6

PostPosted: Wed Dec 06, 2006 5:08 pm    Post subject: Reply with quote

Thanks, with your hint I got at least this dfl app compiled:
Code:
import dfl.all;

int main()
{
   Form myForm;
   Button myButton;
   
   myForm = new Form;
   myForm.text = "DFL Example";
   
   myButton = new Button;
   myButton.text = "Hello, World";
   myButton.size = Size(100, 24);
   myButton.parent = myForm;
   
   Application.run(myForm);
   
   return 0;
}


The size is 1.3MB Shocked

Now I tried to generate libs from dfl and it worked only with dfl from october 19th, suppose because GDC is not at the same version as DMD.
The cmd line I used was:

Code:
gdc -c dfl/all.d dfl/application.d dfl/base.d dfl/button.d dfl/clipboard.d dfl/collections.d dfl/colordialog.d dfl/com.d dfl/combobox.d dfl/commondialog.d dfl/control.d dfl/data.d dfl/drawing.d dfl/environment.d dfl/event.d dfl/filedialog.d dfl/folderdialog.d dfl/fontdialog.d dfl/form.d dfl/groupbox.d dfl/label.d dfl/listbox.d dfl/listview.d dfl/menu.d dfl/messagebox.d dfl/notifyicon.d dfl/panel.d dfl/picturebox.d dfl/registry.d dfl/richtextbox.d dfl/splitter.d dfl/socket.d dfl/tabcontrol.d dfl/textbox.d dfl/timer.d dfl/tooltip.d dfl/treeview.d dfl/usercontrol.d dfl/utf.d dfl/winapi.d dfl/wincom.d -I. -lgphobos -lws2_32 -lole32 -lolepro32 -lgdi32 -luuid -ladvapi32 -lcomctl32 -lcomdlg32


After having all the object files I used ar:

Code:
ar rcs libdfl.a all.o application.o base.o button.o clipboard.o collections.o colordialog.o com.o combobox.o commondialog.o control.o data.o drawing.o environment.o event.o filedialog.o folderdialog.o fontdialog.o form.o groupbox.o label.o listbox.o listview.o menu.o messagebox.o notifyicon.o panel.o picturebox.o registry.o richtextbox.o splitter.o socket.o tabcontrol.o textbox.o timer.o tooltip.o treeview.o usercontrol.o utf.o winapi.o wincom.o


The resulting lib has a size of 1.5MB.

After that I tried to compile the dfl app again with this cmd line:

Code:
gdc -v -mwindows test.d -lole32 -lolepro32 -loleaut32 -lgdi32 -luuid -ladvapi32 -lcomctl32 -lcomdlg32 -lws2_32 -ldfl


but these errors occured:

Code:
libdfl.a(drawing.o):drawing.d:(.text+0x246e): undefined reference to `OleLoadPicture@20'
libdfl.a(drawing.o):drawing.d:(.text+0x2788): undefined reference to `CreateStreamOnHGlobal@12'
libdfl.a(control.o):control.d:(.text+0x246b): undefined reference to `RegisterDragDrop@8'
libdfl.a(control.o):control.d:(.text+0x24ed): undefined reference to `RevokeDragDrop@4'
libdfl.a(control.o):control.d:(.text+0x5eb0): undefined reference to `DoDragDrop@16'
libdfl.a(control.o):control.d:(.text+0x7337): undefined reference to `RegisterDragDrop@8'
libdfl.a(application.o):application.d:(.text+0x24ad): undefined reference to `InitCommonControls@0'
libdfl.a(application.o):application.d:(.text+0x2536): undefined reference to `OleInitialize@4'
libdfl.a(socket.o):socket.d:(.text+0x5f): undefined reference to `WSAAsyncSelect@16'
libdfl.a(socket.o):socket.d:(.text+0x14c): undefined reference to `WSAAsyncSelect@16'
libdfl.a(socket.o):socket.d:(.text+0x4ef): undefined reference to `WSACancelAsyncRequest@4'
libdfl.a(socket.o):socket.d:(.text+0x61a): undefined reference to `WSAAsyncGetHostByName@20'
libdfl.a(socket.o):socket.d:(.text+0x6f7): undefined reference to `WSAAsyncGetHostByAddr@28'
libdfl.a(clipboard.o):clipboard.d:(.text+0x26): undefined reference to `OleGetClipboard@4'
libdfl.a(clipboard.o):clipboard.d:(.text+0x253): undefined reference to `OleSetClipboard@4'
libdfl.a(clipboard.o):clipboard.d:(.text+0x27b): undefined reference to `OleFlushClipboard@0'
libdfl.a(clipboard.o):clipboard.d:(.text+0x293): undefined reference to `OleSetClipboard@4'
libgphobos.a(com.o):(.text+0x2): undefined reference to `IID_IUnknown'
libgphobos.a(socket.o):(.text+0x76): undefined reference to `WSAStartup@8'
libgphobos.a(socket.o):(.text+0x1c0): undefined reference to `getprotobyname@4'
libgphobos.a(socket.o):(.text+0x201): undefined reference to `getprotobynumber@4'
libgphobos.a(socket.o):(.text+0x379): undefined reference to `getservbyname@8'
libgphobos.a(socket.o):(.text+0x3c6): undefined reference to `getservbyname@8'
libgphobos.a(socket.o):(.text+0x41d): undefined reference to `getservbyport@8'
libgphobos.a(socket.o):(.text+0x468): undefined reference to `getservbyport@8'
libgphobos.a(socket.o):(.text+0x675): undefined reference to `gethostbyname@4'
libgphobos.a(socket.o):(.text+0x6e5): undefined reference to `gethostbyaddr@12'
libgphobos.a(socket.o):(.text+0x741): undefined reference to `inet_addr@4'
libgphobos.a(socket.o):(.text+0x764): undefined reference to `gethostbyaddr@12'
libgphobos.a(socket.o):(.text+0xa30): undefined reference to `inet_ntoa@4'
libgphobos.a(socket.o):(.text+0xb2c): undefined reference to `inet_addr@4'
libgphobos.a(socket.o):(.text+0xd97): undefined reference to `socket@12'
libgphobos.a(socket.o):(.text+0xe68): undefined reference to `getprotobyname@4'
libgphobos.a(socket.o):(.text+0xf44): undefined reference to `ioctlsocket@12'
libgphobos.a(socket.o):(.text+0xffe): undefined reference to `getsockopt@20'
libgphobos.a(socket.o):(.text+0x1046): undefined reference to `bind@12'
libgphobos.a(socket.o):(.text+0x10e6): undefined reference to `connect@12'
libgphobos.a(socket.o):(.text+0x1178): undefined reference to `listen@8'
libgphobos.a(socket.o):(.text+0x1245): undefined reference to `accept@12'
libgphobos.a(socket.o):(.text+0x1357): undefined reference to `shutdown@8'
libgphobos.a(socket.o):(.text+0x136d): undefined reference to `closesocket@4'
libgphobos.a(socket.o):(.text+0x1416): undefined reference to `gethostname@8'
libgphobos.a(socket.o):(.text+0x14ea): undefined reference to `getpeername@12'
libgphobos.a(socket.o):(.text+0x158a): undefined reference to `getsockname@12'
libgphobos.a(socket.o):(.text+0x1615): undefined reference to `send@16'
libgphobos.a(socket.o):(.text+0x1694): undefined reference to `sendto@24'
libgphobos.a(socket.o):(.text+0x1721): undefined reference to `sendto@24'
libgphobos.a(socket.o):(.text+0x1799): undefined reference to `recv@16'
libgphobos.a(socket.o):(.text+0x1859): undefined reference to `recvfrom@24'
libgphobos.a(socket.o):(.text+0x1905): undefined reference to `recvfrom@24'
libgphobos.a(socket.o):(.text+0x1983): undefined reference to `getsockopt@20'
libgphobos.a(socket.o):(.text+0x1acd): undefined reference to `setsockopt@20'
libgphobos.a(socket.o):(.text+0x1c5e): undefined reference to `Select@20'
libgphobos.a(socket.o):(.text+0x1c95): undefined reference to `WSAGetLastError@0'
libgphobos.a(socket.o):(.text+0x5):undefined reference to `WSAGetLastError@0'
libgphobos.a(socket.o):(.text+0xc5): undefined reference to `WSACleanup@0'


And now my lack of experience kicked in...


Anyway it's really sad that there are no real docs for GDC and how to use different D code with it (or even generate libs...) on Windows.

As a newbie I'm kinda lost...

Is there anybody working with GDC on windows?
Which gui libs are you using?
Is there a forum for GDC?
Back to top
View user's profile Send private message
xxltux



Joined: 10 Sep 2007
Posts: 15

PostPosted: Mon Sep 10, 2007 9:52 am    Post subject: Reply with quote

Replace
Code:
gdc -v -mwindows test.d -lole32 -lolepro32 -loleaut32 -lgdi32 -luuid -ladvapi32 -lcomctl32 -lcomdlg32 -lws2_32 -ldfl
by
Code:
gdc -v -mwindows test.d -lole32 -lolepro32 -loleaut32 -lgdi32 -luuid -ladvapi32 -lcomctl32 -lcomdlg32  -ldfl -lws2_32

I think the linker have already resolved socket symbols.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL 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