Hey Colin. First thank you for the response. I guess you didn't notice
that I didn't include the "struct" part in my "C" code declaration at first
(it was closer to the bottom of my message). I only added the "struct" part
after receiving this same error (this has solved a similar problem before).
As a result, I still do not understand this error.
Regards
Chris Saunders
----- Original Message -----
From: Colin LeMahieu
To:
[hidden email]
Sent: Thursday, October 08, 2009 8:15 PM
Subject: Re: [eiffel_software] Don't understand this error
This is a C compilation error. FILE_ALLOCATION_INFO is already typedef'ed
from a struct. Drop "struct" from within "sizeof".
On Thu, Oct 8, 2009 at 6:15 PM, Chris Saunders
<
[hidden email]>wrote:
>
>
> I'm working on an Eiffel interface to some Windows "C" struct's. The
> specific one I'm currently working on is FILE_ALLOCATION_INFO. I'm getting
> this error from the "C" compiler:
>
> 2 C Compiler Error: Error C2027: use of undefined type
> 'FILE_ALLOCATION_INFO' .\eifgens\wel_file_project\w_code\c17\fi554.c 31, 1
>
> The error comes from this:
>
> c_structure_size: NATURAL_64
> -- Size to allocate (in bytes)
> external
> "C inline use <Windows.h>"
> alias
> "[
> return (size_t)sizeof (struct FILE_ALLOCATION_INFO);
> ]"
> end
>
> Although I have used "C inline use <Windows.h>" Windows.h does include
> WinBase.h which is where FILE_ALLOCATION_INFO is declared. In the return
> statement of the "C" code I first tried "return (size_t)sizeof
> (FILE_ALLOCATION_INFO);. I cannot see the source of this error.
>
> Regards
> Chris Saunders
> ""
>
>
>
[Non-text portions of this message have been removed]