I try to use the
struct sockaddr_in sin;
but if I use this I get
Variable has incomplete type 'struct sockaddr_in'
and
Forward declaration of 'struct sockaddr_in'
as Error. I get error when I use Xcode4. In Xcode3.2 it works. Does someone know how to solve this error?? My imports are
#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#include <netdb.h>
#import <SystemConfiguration/SCNetworkReachability.h>
did you link your target with these two libraries?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With