By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,192 Members | 852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,192 IT Pros & Developers. It's quick & easy.

file lock in MinGW

P: n/a
Hello All,

I'm trying to lock a file under windows, using MinGW, I'm using the
same code I use under Linux, but it keeps giving me errors like

aggregate `flock fl' has incomplete type and cannot be defined
`F_SETLK' undeclared (first use this function
`fcntl' undeclared (first use this function

does any one have any idea,
I'm using MinGW gcc 3.2.3

thankx for your time

Jun 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
yazwas wrote:
Hello All,

I'm trying to lock a file under windows, using MinGW, I'm using the
same code I use under Linux, but it keeps giving me errors like

aggregate `flock fl' has incomplete type and cannot be defined
`F_SETLK' undeclared (first use this function
`fcntl' undeclared (first use this function

does any one have any idea,
I'm using MinGW gcc 3.2.3
My guess is that you're missing a header (probably fcntl.h), but since
flock and fcntl aren't part of Standard C++ per ISO/IEC 14882:2003,
you're better off asking in a g++ newsgroup, such as gnu.g++.help.

Note that I've cross-posted the response there, and set follow-ups there
as well.

Jun 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.