Quantcast

missing fcntl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

missing fcntl

TheBigSmalln
Hi,

we have an application VLP that comiples and works in linux. The compilation of VLP makes use of c++. We succeeded to compile VLP in cygwin.

Now we wish to compile using MinGW and distaster... compiler says:

loggraph.cpp:232:32: error: 'F_SETFL' was not declared in this scope
loggraph.cpp:232:40: error: 'O_NONBLOCK' was not declared in this scope
loggraph.cpp:232:67: error: 'F_GETFL' was not declared in this scope
loggraph.cpp:232:76: error: 'fcntl' was not declared in this scope
loggraph.cpp:232:77: error: 'fcntl' was not declared in this scope

Why? The file "fcntl.h" is in place.

Waiting for a helpful comment,

Adam.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: missing fcntl

Keith Marshall
On 25 February 2011 11:48, TheBigSmalln wrote:
[program designed for *nix -- works in cygwin]
> ... we wish to compile using MinGW and distaster... compiler says:
>
> loggraph.cpp:232:32: error: 'F_SETFL' was not declared in this scope
> loggraph.cpp:232:40: error: 'O_NONBLOCK' was not declared in this scope
> loggraph.cpp:232:67: error: 'F_GETFL' was not declared in this scope
> loggraph.cpp:232:76: error: 'fcntl' was not declared in this scope
> loggraph.cpp:232:77: error: 'fcntl' was not declared in this scope
>
> Why? The file "fcntl.h" is in place.

That's irrelevant; it's present, but it doesn't declare a POSIX
compatible API.  In particular, it doesn't declare fcntl(), or any
of the manifest constants associated with its usage, because
there is no such function in native MS-Windows.

It works in cygwin because that provides fcntl() as part of its
POSIX emulation.  If you want a native build, (as you get from
MinGW), then you need to port your application, avoiding the
use of POSIX APIs which are not supported on MSW.

--
Regards,
Keith.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: missing fcntl

TheBigSmalln
Thank you Keith for fast and precise answer.
Greetings.

2011/2/25 Keith Marshall <[hidden email]>:

> On 25 February 2011 11:48, TheBigSmalln wrote:
> [program designed for *nix -- works in cygwin]
>> ... we wish to compile using MinGW and distaster... compiler says:
>>
>> loggraph.cpp:232:32: error: 'F_SETFL' was not declared in this scope
>> loggraph.cpp:232:40: error: 'O_NONBLOCK' was not declared in this scope
>> loggraph.cpp:232:67: error: 'F_GETFL' was not declared in this scope
>> loggraph.cpp:232:76: error: 'fcntl' was not declared in this scope
>> loggraph.cpp:232:77: error: 'fcntl' was not declared in this scope
>>
>> Why? The file "fcntl.h" is in place.
>
> That's irrelevant; it's present, but it doesn't declare a POSIX
> compatible API.  In particular, it doesn't declare fcntl(), or any
> of the manifest constants associated with its usage, because
> there is no such function in native MS-Windows.
>
> It works in cygwin because that provides fcntl() as part of its
> POSIX emulation.  If you want a native build, (as you get from
> MinGW), then you need to port your application, avoiding the
> use of POSIX APIs which are not supported on MSW.
>
> --
> Regards,
> Keith.
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> MinGW-users mailing list
> [hidden email]
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:[hidden email]?subject=unsubscribe
>

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...