Re: cast a C char array - offset ?

2015-02-04 Thread irtcupc via Digitalmars-d-learn
On Monday, 2 February 2015 at 13:40:30 UTC, irtcupc wrote: On Monday, 2 February 2015 at 13:34:28 UTC, ketmar wrote: On Mon, 02 Feb 2015 13:32:57 +, ketmar wrote: On Mon, 02 Feb 2015 13:23:23 +, irtcupc wrote: my current understanding is that: - C: char

Re: cast a C char array - offset ?

2015-02-02 Thread irtcupc via Digitalmars-d-learn
On Monday, 2 February 2015 at 12:42:24 UTC, FG wrote: On 2015-02-02 at 13:16, irtcupc wrote: The manual section about interfacing from c states that type[] is inter-compatible from C to D, however, I face this strange case: - C declaration: char identifier[64]; - D declaration: char[64]

Re: cast a C char array - offset ?

2015-02-02 Thread irtcupc via Digitalmars-d-learn
On Monday, 2 February 2015 at 13:34:28 UTC, ketmar wrote: On Mon, 02 Feb 2015 13:32:57 +, ketmar wrote: On Mon, 02 Feb 2015 13:23:23 +, irtcupc wrote: my current understanding is that: - C: char CompleteInstr[INSTRUCT_LENGTH] is actually a raw chunk - D: defining the member as

Re: cast a C char array - offset ?

2015-02-02 Thread irtcupc via Digitalmars-d-learn
On Monday, 2 February 2015 at 12:57:37 UTC, Mike Parker wrote: On 2/2/2015 9:16 PM, irtcupc wrote: The manual section about interfacing from c states that type[] is inter-compatible from C to D, however, I face this strange case: - C declaration: char identifier[64]; - D declaration:

Re: strlen, strcpy, etc errors when trying to link an object

2015-02-02 Thread irtcupc via Digitalmars-d-learn
On Monday, 2 February 2015 at 05:30:04 UTC, ketmar wrote: On Sun, 01 Feb 2015 18:34:01 +, irtcupc wrote: did you build BeaEngine with dmc? if not, try to rebuild with dmc compiler. It has worked, compiled with dmc, __IBMCPP__ compatibility mode, thx for pointing me out the idea.

cast a C char array - offset ?

2015-02-02 Thread irtcupc via Digitalmars-d-learn
The manual section about interfacing from c states that type[] is inter-compatible from C to D, however, I face this strange case: - C declaration: char identifier[64]; - D declaration: char[64] identifier; - the result is only correct if i slice by (- pointer size): char[64] fromC(char[64]

Re: strlen, strcpy, etc errors when trying to link an object

2015-02-01 Thread irtcupc via Digitalmars-d-learn
On Sunday, 1 February 2015 at 18:19:54 UTC, irtcupc wrote: Hello, I try to link an object file under win32, the format is ok (omf), i haven't yet started to write the di interface (it exists in a c H file that i'll translate) that a simple compilation try gives me: ---