473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Mingw32, unistd.h and my program

I have a class that uses unistd.h functions for file I/O handling, I
have not used this class in a long time, but it worked just fine in
LINUX and CYGWIN, but under MINGW32 it doesn't even recognize the
function in unistd.h, and the compiler gives me errors like.

gnu_io.cpp:10: error: `F_OK' undeclared (first use this function)
gnu_io.cpp:10: error: `access' undeclared (first use this function)

What am I doing wrong?

Oct 20 '05 #1
6 4774
Al-Burak wrote:
I have a class that uses unistd.h functions for file I/O handling, I
have not used this class in a long time, but it worked just fine in
LINUX and CYGWIN, but under MINGW32 it doesn't even recognize the
function in unistd.h, and the compiler gives me errors like.

gnu_io.cpp:10: error: `F_OK' undeclared (first use this function)
gnu_io.cpp:10: error: `access' undeclared (first use this function)

What am I doing wrong?


1) cross-posting to multiple newsgroups.
2) Asking this question in three newgroups that have NOTHING to do with
your problem.

But the answer you are probably looking for is that mingw doesn't
support what you're trying to do. There is no such thing as access under
Windows, hence it's not in mingw. Mingw uses the Windows C library to
accomplish things, while cygwin emulates anything Windows doesn't have.
This is why it works on cygwin, but not mingw.

Next time you have a problem with mingw, ask it on their mailing list,
and ONLY their mailing list, please.

--John Ratliff
Oct 20 '05 #2
Thank you for your prompt response, I honestly appreciate your input.
However, you reply has also raised another question, and with all due
respect I would like to have your input on this matter as well.
First, I would like to let you know what I think of cross-posted this
question.
If I have product to sell, and I want a broad audience to know that
this product exists, I would not put up a flyer at the nearest
bus-shelter, what I would do however is to advertise on TV, radio, news
paper, and yes flyers, but only on one bus-shelter, but in all possible
bus-shelters, thus letting as many people as possible know that my
product exists.
Now, to bring my point home, I have a question and I would like to
reach out to as many as possible programmers who like yourself, have a
more extensive knowledge about the subject. To achieve this goal I
chose to post the same question, in three news groups thus extending
the range and quality of the replies.

Now that you know my perspective on the matter, I would like to hear
yours.
Again, thanks for your input.

Oct 20 '05 #3
Thank you for your prompt response, I honestly appreciate your input.
However, you reply has also raised another question, and with all due
respect I would like to have your input on this matter as well.
First, I would like to let you know what I think of cross-posting this
question.
Say for instance that I have product to sell, and I want a broad
audience to know that this product exists, I would not put up a flyer
at the nearest bus-shelter, what I would do however is to advertise on
TV, radio, news paper, and yes flyers, but not only on one bus-shelter,
but in all bus-shelters I could place that flyer on, thus letting as
many people as possible know that my product exists.
Now, to bring my point home, I have a question and I would like to
reach out to as many as possible programmers who like yourself, have a
more extensive knowledge about the subject. To achieve this goal I
chose to post the same question, in three news groups thus extending
the range and quality of the replies.

Now that you know my perspective on the matter, I would like to hear
yours.

I apologize for any inconvenience this might have caused you and again,
thanks for your input.

Oct 20 '05 #4
Al-Burak wrote:

If I have product to sell, and I want a broad audience to know that
this product exists, I would not put up a flyer at the nearest
bus-shelter, what I would do however is to advertise on TV, radio,
news paper, and yes flyers, but only on one bus-shelter, but in all
possible bus-shelters, thus letting as many people as possible know
that my product exists.
Now, to bring my point home, I have a question and I would like to
reach out to as many as possible programmers who like yourself, have a
more extensive knowledge about the subject. To achieve this goal I
chose to post the same question, in three news groups thus extending
the range and quality of the replies.


Your analogy is flawed. You aren't paying for advertising, you are
asking for help. You are therefore expected to follow the rules of the
newsgroups that you are intruding upon.

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Oct 20 '05 #5
Al-Burak wrote:
Thank you for your prompt response, I honestly appreciate your input.
However, you reply has also raised another question, and with all due
respect I would like to have your input on this matter as well.
First, I would like to let you know what I think of cross-posted this
question.
If I have product to sell, and I want a broad audience to know that
this product exists, I would not put up a flyer at the nearest
bus-shelter, what I would do however is to advertise on TV, radio, news
paper, and yes flyers, but only on one bus-shelter, but in all possible
bus-shelters, thus letting as many people as possible know that my
product exists.
Now, to bring my point home, I have a question and I would like to
reach out to as many as possible programmers who like yourself, have a
more extensive knowledge about the subject. To achieve this goal I
chose to post the same question, in three news groups thus extending
the range and quality of the replies.

Now that you know my perspective on the matter, I would like to hear
yours.
Again, thanks for your input.


I was a n00b once myself, and asked off-topic questions in this very
group. I was treated to the same terse response I gave you (many have
been treated worse), and for that reason I'm sorry I was so rude. I
understand that newgroups may be new to some people and they may not
know where to ask questions or how to determine where to ask questions.
My own newsgroup server has some 30,000+ newsgroups, many of which have
names that suggest overlap in topic.

Allow me to educate you. First, nearly every newsgroup has what is
called a newsgroup FAQ. This FAQ answers common questions people might
have about the subject nature and more importantly, what subjects are
discussed on the newsgroup. comp.lang.c++ is dedicated to the standard
C++ language. This is documented in the comp.lang.c++ FAQ at:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

You can find the entire comp.lang.c++ FAQ at
http://www.parashift.com/c++-faq-lite/

More generally, to find any FAQ for any newsgroup, you can go on
www.faqs.com, or just google. For example google comp.lang.c++ FAQ and
the FAQ for this newsgroup comes right up.

Now, you posted to three groups, comp.lang.c++, gnu.gcc.help, and
gnu.g++.help. Had you read any of the three FAQs, you would know that
none of them deal with your specific problem regarding MinGW and unistd.
I can't think of any specific groups that would be helpful, as I know of
no MinGW newsgroup, however, there is a MinGW mailing list, which you
can learn more about at http://www.mingw.org/lists.shtml

gcc/g++ has nothing to do with POSIX, which is where unistd comes in.
comp.lang.c++ has nothing to do with POSIX either. Since you want to
know why MinGW doesn't do something while cygwin and Linux do, I think
the MinGW mailing list would have been the best place to start. I'm not
sure how you came up with the three groups you posted to, but please
don't pick at random in the future.

Finally, cross-posting in general is considered rude. This is because it
means you didn't take the time to find out which newsgroup is really
suited to answer your question. If you can't be bothered to find out the
topic of the newsgroups, why should the people who take time to answer
questions for no compensation bother to assist you.

Finally, I will defend the newsgroup by saying the people who come here
do so to answer questions related to the topic of the newsgroup. They
can't spend all their time answering questions that are already answered
in the FAQ. This is the purpose of the FAQ.

I find it best to simply direct people to the comp.lang.c++ FAQ. I have
no idea why I decided to respond as I did, and for my rudeness, I do
apologize.

--John Ratliff
Oct 20 '05 #6
Ah! the toad of the group.

Intruding, intruding! oh my "friend"... (lol) this is a public news
group and yes I was unaware of the rules and that is my excuse for my
mistake, what your excuse for your rudeness?
The shame is on you for treating so terribly bad a new comer.

Chang your user name to de-faul user, it suits you better.

Oct 25 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: orion30 | last post by:
I would like to know if somebody has successfully uses SWIF using MSYS / MINGW32 / PYTHON. I tried to do it but apparently, I failed. Is there somebody who can help me and give a little...
2
by: Travis Oliphant | last post by:
Has anyone succeeded in making a usable def file from python23.lib so that which can be used to compile extensions with mingw32? I have tried pexports (0.43 and 0.42h) and impdef which have both...
6
by: Chris Gonnerman | last post by:
I'll be quick. Here's a transcript: C:\usr\WConio-1.5>python setup.py build --compiler=mingw32 running build running build_py running build_ext building '_WConio' extension writing...
2
by: Dave Haynes | last post by:
Hi, This is just as much a PostgreSQL question as a Python one, but here goes... I've been trying to port the psycopg interface to a Win2K client (server runs FreeBSD). I'm using MinGW32...
1
by: Pasacco | last post by:
Dear I need to modify a program that is written by other people, and I see #include <unistd.h> #include <zlib.h> which is not a standard C++ header. Could someone kindly tell me which...
2
by: clusardi2k | last post by:
Hello, I'm trying to understand someone else code. The below compiles and works fine and dandy. #include <sys/types.h> #include "unistd.h" #include "stdio.h"
1
by: Al-Burak | last post by:
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...
1
by: Mike | last post by:
According to http://www.opengroup.org/pubs/online/7908799/xsh/pread.html , pread() function should be declared in <unistd.h>. But when I preprocessed following case: #include <unistd.h>...
0
by: Rich Healey | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 AON LAZIO wrote: Why remove "###Bla bla bla bunch of errors###" How do we help without the error messages! - -- Rich Healey - iTReign \ ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.