digitalmars.D - Win32 API Tango / using what ?
- BLS (3/3) Nov 13 2007 Confused ... Tango is not in sync. with the latest efforts of the
- Sean Kelly (12/14) Nov 13 2007 We originally tried to use the headers provided in the bindings project
- Lars Ivar Igesund (18/36) Nov 13 2007 Also note that there are/used to be codegen issues and compile speed iss...
- Sascha Katzner (12/21) Nov 14 2007 If you use the provided makefile it creates a lib with all headers. You
- BLS (7/36) Nov 14 2007 Seems that GNU Make is needed. Can you confirm ?
- Sascha Katzner (7/12) Nov 14 2007 I don't use Tango, because I really don't like the whole idea of a
- Lutger (9/31) Nov 14 2007 The easiest thing to do is use dsss. My primitive conf file is just this...
- BLS (2/37) Nov 14 2007 Thanks Lutger, a worthfull information.
- Sean Kelly (5/23) Nov 14 2007 If you have a library with more Win32 stuff in it than Tango offers, you...
-
Stewart Gordon
(24/35)
Nov 15 2007
"Sascha Katzner"
wrote in message - Tomas Lindquist Olsen (2/26) Nov 15 2007 Enums generate typeinfo, which is probably what you're seeing.
- Sean Kelly (3/5) Nov 15 2007 Even unnamed enums?
- Tomas Lindquist Olsen (8/16) Nov 15 2007 Hmm. good point. it's definitely outputting static data for the .init
Confused ... Tango is not in sync. with the latest efforts of the WINAPI community. no kernel, mm, bla bla, gdi+, and so on Why
Nov 13 2007
BLS wrote:Confused ... Tango is not in sync. with the latest efforts of the WINAPI community. no kernel, mm, bla bla, gdi+, and so onWe originally tried to use the headers provided in the bindings project on dsource, but ran into too many problems. They contained a ton of errors (at the time--they may have since improved), and in some cases contained duplicate declarations (winsock vs. winsock2) that were too troublesome to sort out. As a result, we ended up using a set of headers someone else supplied to us instead. They've done the trick so far, but I won't go so far as to claim that they're perfect or complete. I have my hands full just dealing with the Posix headers. If you or someone else wishes to volunteer to sort out the Win32 headers for Tango, that would be great. Sean
Nov 13 2007
Sean Kelly wrote:BLS wrote:Also note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow). The above also means that the binary size increase a lot, as every module compiled into a D program, adds about 500 bytes. The direct port meant using static const variables a lot, and these was put into the executable, increasing binary size by a large quantity of bytes. Using enums instead would fix this, but seemed like an onerous task at the time. As Sean said, and which may apply to these points too, things may have changed and there may not be any issues left. We'd like to be careful with just importing such a large body of code again, though. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoConfused ... Tango is not in sync. with the latest efforts of the WINAPI community. no kernel, mm, bla bla, gdi+, and so onWe originally tried to use the headers provided in the bindings project on dsource, but ran into too many problems. They contained a ton of errors (at the time--they may have since improved), and in some cases contained duplicate declarations (winsock vs. winsock2) that were too troublesome to sort out. As a result, we ended up using a set of headers someone else supplied to us instead. They've done the trick so far, but I won't go so far as to claim that they're perfect or complete. I have my hands full just dealing with the Posix headers. If you or someone else wishes to volunteer to sort out the Win32 headers for Tango, that would be great. Sean
Nov 13 2007
Lars Ivar Igesund wrote:Also note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow).If you use the provided makefile it creates a lib with all headers. You can simply link this file in your projects without the need to recompile it every time.The above also means that the binary size increase a lot, as every module compiled into a D program, adds about 500 bytes. The direct port meant using static const variables a lot, and these was put into the executable, increasing binary size by a large quantity of bytes. Using enums instead would fix this, but seemed like an onerous task at the time.I don't know if static const have this effect but we use enums anyway everywhere it is reasonable: http://www.dsource.org/projects/bindings/wiki/WindowsApi/Instructions ...and my observation is that the linker only includes what he needs from the lib file. So you can simply include all headers (via simple "import win32.windows;") without it adding even a byte to your executable. LLAP, Sascha Katzner
Nov 14 2007
Sascha Katzner schrieb:Lars Ivar Igesund wrote:Seems that GNU Make is needed. Can you confirm ? I am a Tango fan. So I want to build my Windows GUI in conjunction with Tango but I WONDER how to manage it to use (to a certain degree) the binding project win sources and the Tango windows. stuff. Well I think the Tango forum is a better place to ask. Thanks BjoernAlso note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow).If you use the provided makefile it creates a lib with all headers. You can simply link this file in your projects without the need to recompile it every time.The above also means that the binary size increase a lot, as every module compiled into a D program, adds about 500 bytes. The direct port meant using static const variables a lot, and these was put into the executable, increasing binary size by a large quantity of bytes. Using enums instead would fix this, but seemed like an onerous task at the time.I don't know if static const have this effect but we use enums anyway everywhere it is reasonable: http://www.dsource.org/projects/bindings/wiki/WindowsApi/Instructions ...and my observation is that the linker only includes what he needs from the lib file. So you can simply include all headers (via simple "import win32.windows;") without it adding even a byte to your executable. LLAP, Sascha Katzner
Nov 14 2007
BLS wrote:Seems that GNU Make is needed. Can you confirm ?Yes, GNU make is needed. The make from digital mars is to primitive.I am a Tango fan. So I want to build my Windows GUI in conjunction with Tango but I WONDER how to manage it to use (to a certain degree) the binding project win sources and the Tango windows. stuff. Well I think the Tango forum is a better place to ask.I don't use Tango, because I really don't like the whole idea of a second standard library, so I can't help you there. ;-) But I see no reason why it shouldn't be possible to use both in conjunction. LLAP, Sascha Katzner
Nov 14 2007
BLS wrote:Sascha Katzner schrieb:The easiest thing to do is use dsss. My primitive conf file is just this atm: name=win32 [win32] buildflags=-inline -O -release -version=WindowsXP -version=Unicode I've used the win32 bindings with Tango and it works fine. There are only a couple of imports of the c library that needs to be changed. I also deleted winsock.d and testall.d, iirc that was it.Lars Ivar Igesund wrote:Seems that GNU Make is needed. Can you confirm ? I am a Tango fan. So I want to build my Windows GUI in conjunction with Tango but I WONDER how to manage it to use (to a certain degree) the binding project win sources and the Tango windows. stuff. Well I think the Tango forum is a better place to ask. Thanks BjoernAlso note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow).If you use the provided makefile it creates a lib with all headers. You can simply link this file in your projects without the need to recompile it every time.
Nov 14 2007
Lutger schrieb:BLS wrote:Thanks Lutger, a worthfull information.Sascha Katzner schrieb:The easiest thing to do is use dsss. My primitive conf file is just this atm: name=win32 [win32] buildflags=-inline -O -release -version=WindowsXP -version=Unicode I've used the win32 bindings with Tango and it works fine. There are only a couple of imports of the c library that needs to be changed. I also deleted winsock.d and testall.d, iirc that was it.Lars Ivar Igesund wrote:Seems that GNU Make is needed. Can you confirm ? I am a Tango fan. So I want to build my Windows GUI in conjunction with Tango but I WONDER how to manage it to use (to a certain degree) the binding project win sources and the Tango windows. stuff. Well I think the Tango forum is a better place to ask. Thanks BjoernAlso note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow).If you use the provided makefile it creates a lib with all headers. You can simply link this file in your projects without the need to recompile it every time.
Nov 14 2007
BLS wrote:Sascha Katzner schrieb:If you have a library with more Win32 stuff in it than Tango offers, you can rename it to tango-win32-dmd.lib and replace the one shipped with Tango. It will be linked automatically. SeanLars Ivar Igesund wrote:Seems that GNU Make is needed. Can you confirm ? I am a Tango fan. So I want to build my Windows GUI in conjunction with Tango but I WONDER how to manage it to use (to a certain degree) the binding project win sources and the Tango windows. stuff.Also note that there are/used to be codegen issues and compile speed issues. Since all the Win32 headers are linked together like spaghetti, you risk having to compile all every time (and they are big, so it gets slow).If you use the provided makefile it creates a lib with all headers. You can simply link this file in your projects without the need to recompile it every time.
Nov 14 2007
"Sascha Katzner" <sorry.no spam.invalid> wrote in message news:fhec86$9pi$1 digitalmars.com... <snip><snip> I'm a little confused by this. ---------- const int qwert = 42; enum { yuiop = 69 } ---------- Under DMD 1.023, the .obj file sizes are: - for an empty D file, 349 - with just the const int, 396 - with just the enum, 605 - the whole thing, 652 so they are generating some object code either way. Strange - I'd always been under the impression they didn't, but were expanded at compile-time and then discarded. D certainly ought to support purely compile-time symbolic constants. In 2.007, the whole testcase generates a 666-byte object file. Stewart. -- My e-mail address is valid but not my primary mailbox. Please keep replies on the 'group where everybody may benefit.The above also means that the binary size increase a lot, as every module compiled into a D program, adds about 500 bytes. The direct port meant using static const variables a lot, and these was put into the executable, increasing binary size by a large quantity of bytes. Using enums instead would fix this, but seemed like an onerous task at the time.I don't know if static const have this effect but we use enums anyway everywhere it is reasonable: http://www.dsource.org/projects/bindings/wiki/WindowsApi/Instructions
Nov 15 2007
Stewart Gordon wrote:I'm a little confused by this. ---------- const int qwert = 42; enum { yuiop = 69 } ---------- Under DMD 1.023, the .obj file sizes are: - for an empty D file, 349 - with just the const int, 396 - with just the enum, 605 - the whole thing, 652 so they are generating some object code either way. Strange - I'd always been under the impression they didn't, but were expanded at compile-time and then discarded. D certainly ought to support purely compile-time symbolic constants. In 2.007, the whole testcase generates a 666-byte object file. Stewart.Enums generate typeinfo, which is probably what you're seeing.
Nov 15 2007
Tomas Lindquist Olsen wrote:Enums generate typeinfo, which is probably what you're seeing.Even unnamed enums? Sean
Nov 15 2007
Sean Kelly wrote:Tomas Lindquist Olsen wrote:Hmm. good point. it's definitely outputting static data for the .init property, but actually I think you're right it should not output a distinct instance of TypeInfo_Enum. Looking at the object files from gdc, it seems like it is putting the symbols for typeid(int) and the TypeInfo_Enum baseclass in the object file though. Maybe this is actually a harmless a bug.Enums generate typeinfo, which is probably what you're seeing.Even unnamed enums? Sean
Nov 15 2007