Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22001

Error: implicit declaration of function `int open(...)'

$
0
0

I am using open function in one of my C++ project on Solaris OS.

#include <sys/types.h> 
#include <sys/stat.h> 
#include <fcntl.h>

char in_pathname[PATH_MAX];
int  in_fd = -1;
in_fd = ::open(in_pathname, (O_RDWR|O_CREAT|O_TRUNC), 0600);

Using the above line I am getting following compilation error.

implicit declaration of function `int open(...)'

Any idea why its happening.

Note: This source code is very old and I am using gcc version 2.95.3 to compile it.


Viewing all articles
Browse latest Browse all 22001

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>