Mingw32, unistd.h and my program

A

Al-Burak

I have a class that uses the file I/O functions in unistd.h such as
'access( const char*, F_OK )' and others. When compiling under UNIX or
Cygwin there is no problem, but under Mingw this functions are not even
recognized by the compiler when it displays
'gnu_io.cpp:10: error: `F_OK' undeclared (first use this function)'
'gnu_io.cpp:10: error: `access' undeclared (first use this function)'

What can I do to fix this problem?

TIA
 
U

Ulrich Eckhardt

Please set a follow-up next time. Also consider posting to
comp.lang.learn.c-c++.

Al-Burak said:
I have a class that uses the file I/O functions in unistd.h such as
'access( const char*, F_OK )' and others. When compiling under UNIX or
Cygwin there is no problem, but under Mingw this functions are not even
recognized by the compiler when it displays
'gnu_io.cpp:10: error: `F_OK' undeclared (first use this function)'
'gnu_io.cpp:10: error: `access' undeclared (first use this function)'

Those functions are not part of C but one of the various Unix APIs. MingW
only provides a win32 API in addition to the standard APIs though.

Uli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top