View previous topic :: View next topic |
Author |
Message |
christof
Joined: 09 Jan 2008 Posts: 7 Location: Hamburg/ Germany
|
Posted: Fri Oct 16, 2009 5:50 am Post subject: Compile error (DMD 1.050/ DFL 0.9.8 |
|
|
Hi,
I have a fresh installation of DMD 1.050 and DFL 0.9.8 on windows, both installed using the installers. Compiling d examples seems to work, however I did not manage to compile any dfl example.
What is wrong?
Thanks, Christof
For example compiling beginner.d looks like this:
> dfl beginner.d -gui
Y
Compiling debug DFL...
C:\D\dmd\import\dfl>C:\D\dmd\windows\bin\dmd -c -debug -g -I.. base.d application.d internal/dlib.d internal/clib.d internal/utf.d internal/com.d control.d form.d registry.d drawing.d menu.d notifyicon.d commondialog.d filedialog.d folderdialog.d panel.d textbox.d richtextbox.d picturebox.d listbox.d groupbox.d splitter.d usercontrol.d button.d label.d collections.d internal/winapi.d internal/wincom.d event.d socket.d timer.d environment.d messagebox.d tooltip.d combobox.d treeview.d tabcontrol.d colordialog.d listview.d data.d clipboard.d fontdialog.d progressbar.d resources.d statusbar.d imagelist.d toolbar.d
control.d(1499): Error: function dfl.drawing.Point.opCall (int,int) does not match parameter types (Point)
control.d(1499): Error: expected 0 arguments, not 1
control.d(3866): Error: function dfl.control.Control.eachGoodChildHandle (HANDLE,bool delegate(HANDLE hw),bool) does not match parameter types (HANDLE,int delegate(HANDLE),bool)
control.d(3867): Error: cannot implicitly convert expression (__dgliteral5) of type int delegate(HANDLE) to bool delegate(HANDLE hw)
control.d(3910): Error: function dfl.control.Control.eachGoodChildHandle (HANDLE,bool delegate(HANDLE hw),bool) does not match parameter types (HANDLE,int delegate(HANDLE),bool)
control.d(3911): Error: cannot implicitly convert expression (__dgliteral6) of type int delegate(HANDLE) to bool delegate(HANDLE hw)
control.d(4761): Error: Integer constant expression expected instead of null
control.d(4761): Error: Integer constant expression expected instead of null
control.d(4761): Error: Integer constant expression expected instead of null
control.d(5743): Error: function dfl.control.Control.delayInvoke (void function()) does not match parameter types (int function(Control cthis, uint[] params))
control.d(5743): Error: cannot implicitly convert expression (__funcliteral7) of type int function(Control cthis, uint[] params) to void function(Control, uint[])
control.d(7485): Error: function dfl.drawing.Rect.opCall (int,int,int,int) does not match parameter types (Rect)
control.d(7485): Error: cannot implicitly convert expression (this.clientRectangle()) of type Rect to RECT*
Failed.
Done. |
|
Back to top |
|
|
tramker
Joined: 12 Nov 2009 Posts: 1
|
Posted: Thu Nov 12, 2009 6:47 pm Post subject: |
|
|
Most likely something has changed in the DMD.
I did manage to compile DFL-snaphost-20090411 with DMD 1.50, just follow the errors and try to fix them, I don't remeber what exactly, but here I my notes if it helps:
- replace null with 0 in several files
- add opCall with correct parametr at two places
- remove void from return
- change dfl.base.Rect to dfl.drawing.Rect in DFL samples |
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Sat Dec 05, 2009 8:48 pm Post subject: |
|
|
Here are my errors (Using DMD 1.51, and DFL 0.98 ).
control.d(4761): Error: Integer constant expression expected instead of null
control.d(4761): Error: Integer constant expression expected instead of null
control.d(5743): Error: function dfl.control.Control.delayInvoke (void
function(
)) does not match parameter types (int function(Control cthis, uint[] params))
control.d(5743): Error: cannot implicitly convert expression (__funcliteral7) of
type int function(Control cthis, uint[] params) to void function(Control, uint[
])
Here's line 4761:
SetClassLongA(hwnd, GCL_HCURSOR, cast(LONG)cast(HCURSOR)null);
And line 5743:
delayInvoke(function(Control cthis, size_t[] params){ cthis.cbits &= ~CBits.RECREATING; });
I just started and I'm totally clueless on how to fix these . |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Tue Dec 08, 2009 4:43 pm Post subject: |
|
|
EDIT:
Okay, I'm going to start explaining what I'm doing. Because after using 1.030 and the DFL release which supposedly has been tested with 1.30 it still doesn't work. I prefer the .zip installation. 1. I put the dfl executable in the bin directory. 2. I put the dfl_build in the lib directory. 3. I put the import and packages. In the folder that contains the bin, and lib file; And it still doesn't work. |
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Tue Dec 08, 2009 9:46 pm Post subject: |
|
|
Okay, I switched to DMD 1.030 so I can use DFL. Now when I compile I get this error.
C:\D\dmd130\dmd\import\dfl>C:\D\dmd130\dmd\bin\lib -c -n -p64 dfl_debug.lib C:\D
\dmd130\dmd\lib\gdi32.lib C:\D\dmd130\dmd\lib\comctl32.lib C:\D\dmd130\dmd\lib\a
dvapi32.lib C:\D\dmd130\dmd\lib\comdlg32.lib C:\D\dmd130\dmd\lib\ole32.lib C:\D\
dmd130\dmd\lib\uuid.lib C:\D\dmd130\dmd\lib\ws2_32.lib user32_dfl.lib shell32_df
l.lib olepro32_dfl.lib base.obj application.obj dlib.obj clib.obj utf.obj com.ob
j control.obj form.obj registry.obj drawing.obj menu.obj notifyicon.obj commondi
alog.obj filedialog.obj folderdialog.obj panel.obj textbox.obj richtextbox.obj p
icturebox.obj listbox.obj groupbox.obj splitter.obj usercontrol.obj button.obj l
abel.obj collections.obj winapi.obj wincom.obj event.obj socket.obj timer.obj en
vironment.obj messagebox.obj tooltip.obj combobox.obj treeview.obj tabcontrol.ob
j colordialog.obj listview.obj data.obj clipboard.obj fontdialog.obj progressbar
.obj resources.obj statusbar.obj imagelist.obj toolbar.obj
'C:\D\dmd130\dmd\bin\lib' is not recognized as an internal or external command,
operable program or batch file.
I used the makelib batch file in side the import folder. |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Tue Dec 08, 2009 11:04 pm Post subject: |
|
|
Hi.
I am running dmd 1.046, DFL dfl-20090411.zip which I got from the snapshot, Juno 5.1 and DDBI .62. Everything is working fine. The problem is, perhaps, the path or the libs are not found. What I did was to create a BAT file that prepares all of these for me. Here is what that bat file has:
Code: | set PATH=c:\D\dmd\windows\bin;c:\D\dm\bin;c:\lsbin;%PATH%
set LIB=\dmd\windows\lib;\dm\lib
set LINKCMD=\dm\bin\link
c:
cd C:\source\d
start "Digital Mars D Compiler v1.046" /dC:\source\d
|
This prepares the environment for me. I also use build or bud to build my code, but I can also use the dfl command, if I need to.
I hope this helps.
jose |
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Wed Dec 09, 2009 9:23 pm Post subject: |
|
|
Didn't work.... Is there any version or any dmd compiler that for sure don't have any errors? |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Wed Dec 09, 2009 10:46 pm Post subject: |
|
|
Can you compile a simple D program with your setup? |
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Thu Dec 10, 2009 9:20 pm Post subject: |
|
|
No, the error always happens when I need to build the Lib files. |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Fri Dec 11, 2009 9:25 am Post subject: |
|
|
I have never tried to build the lib files. I use what Chris provides in the DFL packages. So, you could be right. Have you tried compiling one of the files just alone? I have all my libs in:
C:\D\dmd\windows\lib
and here is the list I have:
Code: |
advapi32.lib
COMCTL32.LIB
comdlg32.lib
CTL3D32.LIB
dfl.lib
dfl_build.lib
dfl_debug.lib
gdi32.lib
kernel32.lib
ODBC32.LIB
ole32.lib
OleAut32.lib
phobos.lib
README.TXT
rpcrt4.lib
shell32.lib
snn.lib
sqlite3.lib
user32.lib
uuid.lib
winmm.lib
winspool.lib
WS2_32.LIB
wsock32.lib |
My command for building a DFL app is,
Code: | build -I..;c:\D\dmd\import -version=gui -version=Phobos OpenProjs.d[quote]
It works like a charm for me, so I don't know what is wrong with your setup. Unless you are using Tango, you should have no problem with dmd 1.46 and the latest DFL snapshot.
I hope this helps,
jose[/quote] |
|
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Sat Dec 12, 2009 10:02 am Post subject: |
|
|
You see, none of my library files in the file folder are .lib type. They're all .obj type. |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Sat Dec 12, 2009 10:15 am Post subject: |
|
|
Yeah. I see. I do have .obj files in the files where the source code exists, but, I also have these. Maybe someone with more profound D architectural background can help us. The only thing that I would suggest is for you to have libs files there and use build/bud to compile your program. If you go that route I can try to help you. The other way, I have not done it. Sorry. |
|
Back to top |
|
|
HeiHon
Joined: 09 Aug 2008 Posts: 10
|
Posted: Sun Dec 13, 2009 6:00 am Post subject: |
|
|
AutoPython wrote: |
'C:\D\dmd130\dmd\bin\lib' is not recognized as an internal or external command,
operable program or batch file.
|
As it seems the lib.exe cannot be found in your search path.
Older dmd versions (I checked dmd 1.033) installed lib.exe into a directory <your install root>\dm\bin and dmd.exe into <your install root>\dmd\bin
So you have to add both directories dm\bin and dmd\bin to your search path - or you can simply try to copy lib.exe (or everything of dm\bin) to C:\D\dmd130\dmd\bin. |
|
Back to top |
|
|
AutoPython
Joined: 05 Dec 2009 Posts: 12
|
Posted: Sun Dec 13, 2009 2:55 pm Post subject: |
|
|
Okay. I am confused like heck.
When I use the command to build the LIB files it builds .obj files, when I add the -lib switch it doesn't make any files. I'm using this command
Code: |
C:\D\dmd130\dmd\bin\dmd -c -debug -g -I.. base.d application.d internal/dlib.d internal/clib.d internal/utf.d internal/com.d control.d form.d registry.d drawing.d menu.d notifyicon.d commondialog.d filedialog.d folderdialog.d panel.d textbox.d richtextbox.d picturebox.d listbox.d groupbox.d splitter.d usercontrol.d button.d label.d collections.d internal/winapi.d internal/wincom.d event.d socket.d timer.d environment.d messagebox.d tooltip.d combobox.d treeview.d tabcontrol.d colordialog.d listview.d data.d clipboard.d fontdialog.d progressbar.d resources.d statusbar.d imagelist.d toolbar.d
|
Why couldn't they make life easy and just make you download it with everything all compiled for you. It would be much bigger but I wouldn't care. |
|
Back to top |
|
|
|