how to reduce a debug symbol error?

2011-06-28 Thread Trass3r
Starting my cl4d executable with 'gdb main -readnow' results in Reading symbols from main...expanding to full symbols...Die: DW_TAG_type_unit (abbrev 4, offset 0x6a) parent at offset: 0xb has children: FALSE attributes: DW_AT_byte_size (DW_FORM_data1) constant: 16 DW_AT_type

r/w binary

2011-06-28 Thread Joel Christensen
I want to save and load levels for my game. The std.stream module doesn't have much examples. Here is my code: void saveLevel( string fileName ) { auto bfile = new std.stream.File; int ver = 1; string verStr = version:; with( bfile ) { scope(

Re: how to reduce a debug symbol error?

2011-06-28 Thread Robert Clipsham
On 28/06/2011 22:47, Trass3r wrote: Starting my cl4d executable with 'gdb main -readnow' results in Reading symbols from main...expanding to full symbols...Die: DW_TAG_type_unit (abbrev 4, offset 0x6a) parent at offset: 0xb has children: FALSE attributes: DW_AT_byte_size (DW_FORM_data1)

Re: how to reduce a debug symbol error?

2011-06-28 Thread Trass3r
First: are you compiling *all* modules with -gc rather than -g? Ah ok, somehow I was mislead into thinking that the gdb patches allow you to use -g. It works now though line numbers are more messed up than I'm used to from cv2pdb + VS. There I only have the usual problems with mixins but

Win32 Application Error

2011-06-28 Thread Loopback
Hi! I've recently been using D to program win32 executables. On the official D site (d-programming-language.org) there is a template of how a basic win32 executable is supposed to be. In this template you are supposed to initialize and terminate the D runtime. If I understand correctly this

Re: Win32 Application Error

2011-06-28 Thread Andrej Mitrovic
It's hard to tell what's going on when we can't see the code for CWindow. Otherwise your code seems to be the same as the template so that part should be fine. Otherwise if you're using multithreading it might be a good idea to call ExitProcess(result) after PostQuitMessage(), as calling

Problem with a convoluted templated struct

2011-06-28 Thread Kiith-Sa
Hello. I am trying to implement a templated struct containing a data member created by std.variant.Algebraic instantiated with the struct's template parameters. The problem is, I want to template the struct with e.g. arrays (lists, etc.) of its own type. I don't know any way to do this without

Re: Win32 Application Error

2011-06-28 Thread Loopback
Thank you for your reply! I do not use multi-threading so it is not related to that. Though I do have located the error. It seems as if the application only hangs/delays application exit, when I load a texture file with DirectX. To be specific, the function in this case is

Re: Win32 Application Error

2011-06-28 Thread Loopback
One more thing, would it perhaps help if I supplied a delegate to the terminate function, since that may output debug messages? I would gladly try it but I am not sure how this supplied delegate is supposed to be. Also want to mention that the initialize functions returns successfully.

Interfacing to C

2011-06-28 Thread Joshua Niehus
Hello, I was trying to run the example on the Interfacing to C page ( http://www.d-programming-language.org/interfaceToC.html) and ran into few issues. To get it to work as is i was .dup(ing) strings into new chars with defined size and passing those with .ptr. Anyway it seemed like quite a bit

Re: Interfacing to C

2011-06-28 Thread Jimmy Cao
On Tue, Jun 28, 2011 at 11:15 PM, Joshua Niehus jm.nie...@gmail.com wrote: Hello, I was trying to run the example on the Interfacing to C page ( http://www.d-programming-language.org/interfaceToC.html) and ran into few issues. To get it to work as is i was .dup(ing) strings into new chars

Re: Problem with a convoluted templated struct

2011-06-28 Thread Ali Çehreli
On Wed, 29 Jun 2011 04:06:02 +0200, Kiith-Sa wrote: Hello. I am trying to implement a templated struct containing a data member created by std.variant.Algebraic instantiated with the struct's template parameters. The problem is, I want to template the struct with e.g. arrays (lists,

Obtaining aligned addresses and aligned spaces for objects

2011-06-28 Thread Ali Çehreli
The address that is passed to emplace() must be properly aligned for that type. Am I correct in thinking that the following functions are a must? If so, do you think that they are correct? If so, are there equivalents in Phobos? /** * Return an aligned address for the type at or after the *