dllexport (was dllimport and initialization issue)

Michael Cronenworth mike at cchtml.com
Thu Jul 22 20:04:16 UTC 2010


Kai Tietz wrote:
> The annoying warnings comes by the fact that _fmode is declared in
> headers to be dllimport'ed. And then you define it.
> Simplest way to solve this is to use a separate file including just
> fcntl.h and then have the line 'int _fmode = _O_BINARY;'
>
>> >  I am attempting to set O_BINARY as default so read() calls will give me
>> >  real data instead of translated garbage.
> Ok, you can change buffer mode of stdin/stdout/stderr file handles
> also in main, too. For streams via setvbuf and for I/O handles via
> _setmode C-runtime functions.

Yes, I will have to judge on how to handle this in the project I am 
dealing with.

Thanks for the pointers.

Michael



More information about the mingw mailing list