View previous topic :: View next topic |
Author |
Message |
lws
Joined: 30 Jul 2005 Posts: 5
|
Posted: Fri Jan 06, 2006 12:34 pm Post subject: DFL + Build |
|
|
I'm a bit confused about how to prevent the console from showing up when i execute a DFL program that ws created via build. Can someone explain? I'm using for example with the beginner.d provided in the examples:
build -gui:4.0 -clean beginner.d
When I run it, the console comes up still. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Jan 06, 2006 1:18 pm Post subject: Re: DFL + Build |
|
|
dfl.all includes:
Code: | version(build)
{
pragma(link, dfl.lib);
pragma(build_def, "EXETYPE NT");
version(gui)
{
pragma(build_def, "SUBSYSTEM WINDOWS,4.0");
}
else
{
pragma(build_def, "SUBSYSTEM CONSOLE,4.0");
}
} |
so using -release -version=gui should do it, or just remove that code from the source file.
I don't use build so I'm not sure of the best way; I'll look more into it. |
|
Back to top |
|
|
lws
Joined: 30 Jul 2005 Posts: 5
|
Posted: Fri Jan 06, 2006 2:32 pm Post subject: |
|
|
Thank you, that fixed it. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun Jan 08, 2006 10:44 am Post subject: Re: DFL + Build |
|
|
Snapshot 20060108 improves build support.
Notes:
* Programs end up around 200 KB larger when using build.
* Use -version=gui to make a Windows GUI exe (no console).
* Need -clean in some cases, which causes compilation time to be a lot longer. Use -clean if:
* Using different compiler switches, e.g. -release/-debug/-version
* Using different compiler version.
|
|
Back to top |
|
|
ideage
Joined: 12 Jul 2006 Posts: 63 Location: china
|
Posted: Mon Oct 02, 2006 2:55 am Post subject: when build,Oplink Error! |
|
|
I use dmd or dfl to compile DFL examples,it work OK,
and use Build,It return:
D:\D\dmd\packages\dfl\examples>build mdi.d -version=gui
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 183: Extension not .RES : comctl32.lib
ws2_32.lib(0) : Error 2: File Not Found ws2_32.lib
----
How fix it?please help!
________
How to Bake
Last edited by ideage on Wed Feb 02, 2011 5:01 pm; edited 1 time in total |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Oct 02, 2006 6:30 am Post subject: Re: when build,Oplink Error! |
|
|
ideage wrote: | How fix it?please help! |
I think build is busted; perhaps you should go back to the old version of build, or stop using build. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Mon Oct 02, 2006 11:53 am Post subject: Re: when build,Oplink Error! |
|
|
ideage wrote: | I use dmd or dfl to compile DFL examples,it work OK,
and use Build,It return:
D:\D\dmd\packages\dfl\examples>build mdi.d -version=gui
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 183: Extension not .RES : comctl32.lib
ws2_32.lib(0) : Error 2: File Not Found ws2_32.lib
----
How fix it?please help! |
Build creates the linker command info in a file with the extention ".ksp". Can you you display that file for me and what version of Build are you using? Note - this .ksp file is deleted by -clean so run it without that switch. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Oct 02, 2006 12:38 pm Post subject: Re: when build,Oplink Error! |
|
|
Derek Parnell wrote: |
Build creates the linker command info in a file with the extention ".ksp". Can you you display that file for me and what version of Build are you using? Note - this .ksp file is deleted by -clean so run it without that switch. |
Build 3.03
C:\dmd\packages\dfl\examples>build mdi.d -Ic:\dmd\import
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 183: Extension not .RES : comctl32.lib
ws2_32.lib(0) : Error 2: File Not Found ws2_32.lib
mdi.ksp:
mdi.obj+c:\dmd\import\dfl\all.obj+c:\dmd\import\dfl\base.obj+(too many to show)
mdi.exe
mdi.map
dfl_build.lib
ws2_32.lib
comctl32.lib
ole32.lib
gdi32.lib
advapi32.lib
comdlg32.lib
uuid.lib
mdi.def/noi/map |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Mon Oct 02, 2006 3:40 pm Post subject: Re: when build,Oplink Error! |
|
|
Thanks. I see the problem and I'll have a fix out ASAP. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
|