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

DFL + Build

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



Joined: 30 Jul 2005
Posts: 5

PostPosted: Fri Jan 06, 2006 12:34 pm    Post subject: DFL + Build Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Chris Miller



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

PostPosted: Fri Jan 06, 2006 1:18 pm    Post subject: Re: DFL + Build Reply with quote

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
View user's profile Send private message
lws



Joined: 30 Jul 2005
Posts: 5

PostPosted: Fri Jan 06, 2006 2:32 pm    Post subject: Reply with quote

Thank you, that fixed it.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Chris Miller



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

PostPosted: Sun Jan 08, 2006 10:44 am    Post subject: Re: DFL + Build Reply with quote

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
View user's profile Send private message
ideage



Joined: 12 Jul 2006
Posts: 63
Location: china

PostPosted: Mon Oct 02, 2006 2:55 am    Post subject: when build,Oplink Error! Reply with quote

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
View user's profile Send private message Send e-mail
Chris Miller



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

PostPosted: Mon Oct 02, 2006 6:30 am    Post subject: Re: when build,Oplink Error! Reply with quote

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
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Mon Oct 02, 2006 11:53 am    Post subject: Re: when build,Oplink Error! Reply with quote

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
View user's profile Send private message
Chris Miller



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

PostPosted: Mon Oct 02, 2006 12:38 pm    Post subject: Re: when build,Oplink Error! Reply with quote

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
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Mon Oct 02, 2006 3:40 pm    Post subject: Re: when build,Oplink Error! Reply with quote

Thanks. I see the problem and I'll have a fix out ASAP.
_________________
--
Derek
skype name: derek.j.parnell
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