osx framework <> linux libs

M

Michael

Hi
I try to compile a OSX project on Linux. I get:

int sflags = fcntl( sock, F_GETFL );
Error:‘F_GETFL’ was not declared in this scope

etc. lots of those. Now this is because the author
has used libcurl framework on OSX? Because this is
different to libcurl libs on Linux? What to do or
how to declare F-GETFL etc.

Many thanks
Michael
 
N

Nick Keighley

I try to compile a OSX project on Linux.

OSX != Linux
get:
                int sflags = fcntl( sock, F_GETFL );
Error: F_GETFL was not declared in this scope

you probably missed out a header that's needed on Linux. RTFM. Have
you tried
 
M

Michael

you probably missed out a header that's needed on Linux. RTFM. Have
you tried

#include<fcntrl.h>

Yes that helped but still I get:

79: error: ‘EBADF’ was not declared in this scope
p:182: error: ‘ENOTSOCK’ was not declared in this scope
ror: ‘EOPNOTSUPP’ was not declared in this scope
rror: ‘EFAULT’ was not declared in this scope
p:191: error: ‘EWOULDBLOCK’ was not declared in this scope
error: ‘EMFILE’ was not declared in this scope
cpp:197: error: ‘ENFILE’ was not declared in this scope

What more headers do I need?
Thanks

PS: I tried those without success:
//#include <sys/types.h>
//#include <sys/socket.h>
 
J

Jorgen Grahn

OSX != Linux


you probably missed out a header that's needed on Linux. RTFM. Have
you tried

#include <fcntrl.h>

You mean fcntl.h. More generally, he can

% find /usr/share/man -name '*.2*' | xargs zgrep F_GETFL

and check what include file the man page says you should use.

For further questions, try a Unix or Linux group -- POSIX APIs are
offtopic here.

/Jorgen
 
M

Michael

Now i get tons of errors (~1000) alike:
r:undefined reference to `fopen'

but I've:
#include <stdio.h>

even such errors where no such functions occur!

How should i proceed with such?
Thanks
 
A

Alain Ketterlin

Michael said:
Now i get tons of errors (~1000) alike:
r:undefined reference to `fopen'

but I've:
#include <stdio.h>

Both facts are unrelated. The error message is from the linker, not the
compiler. There is something seriously wrong in how you compile.
How should i proceed with such?

Wrong place, this group is about c++. Please find an appropriate forum.

-- Alain.
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top