Help with C struct by value on OSX 64bits

2012-04-25 Thread Johan Hernandez
Hi. I'm having trouble calling a C function passing a structure by value, printing a member and getting it back in D but I must be doing something wrong. I have a C file called native.c that defines a function called 'filter' taking a buf_t structure, I compile it using GCC to native.o. From

Re: Help with C struct by value on OSX 64bits

2012-04-25 Thread Johan Hernandez
On Wednesday, 25 April 2012 at 08:38:02 UTC, simendsjo wrote: Could be this one: http://d.puremagic.com/issues/show_bug.cgi?id=5570 Thank you for your response. It's a huge issue :(

Re: Help with C struct by value on OSX 64bits

2012-04-26 Thread Johan Hernandez
On Wednesday, 25 April 2012 at 19:43:27 UTC, Jacob Carlborg wrote: Compile as a 32bit binary. For DMD add "-m32" do the flags. For gcc add "-arch i386". Thanks Jacob, that worked!!! simendsjo: I upvoted and commented the same day bro.