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

Building DWT with GDC (.21) on Win32

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
Stan Brown



Joined: 08 Jan 2007
Posts: 4

PostPosted: Mon Jan 08, 2007 8:48 am    Post subject: Building DWT with GDC (.21) on Win32 Reply with quote

Has anyone been able to get DWT to compile with GDC? I keep getting lots of
errors, particularly with OBJIDL.
Code:
import\dwt\internal\ole\win32\OBJIDL.d:39: Error: identifier 'DWORD' is not
defined

I thought the error may be cause by circular linking problems so I tried
compiling with "-fonly=import\dwt\all". This just results in the compiler
crashing immediately.
Back to top
View user's profile Send private message
Stan Brown



Joined: 08 Jan 2007
Posts: 4

PostPosted: Thu Jan 11, 2007 7:02 pm    Post subject: Reply with quote

OK, I figured out the first part. I had to put a bunch of imports in several internal OLE classes to reference std.c.windows.windows and std.c.windows.com. This shouldn't have been needed though since wintypes, which was imported in each instance, has both those modules set as public. I think there is an issue with public imports across packages.

But the assert issue using "-fall" is still a problem. I've looked at the GHC code in question and can't figure out whats broken with it. This only leaves me with having to debug the compiler code Sad. Maybe if I get really bored I may look in to doing that.
Back to top
View user's profile Send private message
Stan Brown



Joined: 08 Jan 2007
Posts: 4

PostPosted: Sun Jan 14, 2007 9:34 pm    Post subject: Reply with quote

Got it! It wasn't easy or pretty, but I was able to run a simple Hello World app in DWT that was compiled using GDC. A few problems were found that I just skipped for now:

1. I get a duplicate reference error with display.getSortImage. I have no idea why. So I commented it out in that module along with table and tablecolumns.

2. Undefined reference errors for SetLayout and GetLayout in the winapi module. I dummied these out for now. I am thinking the problem is that the latest mingw win32 static libraries are missing these.

3. Some problems with the link widget. I just skipped that module for now.

To compile a release, use the following:

Code:

gdc -frelease -s -O -finline-functions -fversion=OLE_COM -fversion=DRAG_DROP -c $(IMPORTS) -o all.o


Where IMPORTS is just replace with every D module name for DWT.

Compile your application with -mthreads to support threading.

Pragma(lib) doesn't work with GDC, so you need to manually link in all the static libraries yourself. Order is important:

Code:

-ldwt -lgphobos -ladvapi32 -lcomctl32 -lgdi32 -lshell32 -lcomdlg32 -lole32
-luuid -luser32 -limm32 -lshell32 -lmsimg32 -lgdi32 -lkernel32 -lusp10 -lolepro32 -loleaut32 -loleacc
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT 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