This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Socket Programming Beaglebone Unresolved Symbol



Hello,

I am new to developing on CCSv5 for the beaglebone. I have been able to get Hello World working on it and am trying to write a socket function to do network communcations.

I have included headers <string.h> <stdio.h> <stdlib.h> <sys/types.h> <sys/socket.h> <netinet/in.h> <errno.h> <arpa/inet.h>

The main body of function is

int main() {

int sock

struct sockaddr_in address;

sock=socket(PF_INET,SOCK_STREAM,0);

if(sock==-1)

perror("Create socket");

return 0;

}

However I get an error that says symbol 'SOCK_STREAM' could not be resolved. The same error occurs if I use SOCK_DGRAM. I am not sure if I'm missing some header files. Most of the examples I've seen follow this same format.

Any ideas would help why this is not working. 

Thank you,

Jason

  • Jason,

    Which example have you used as a reference and if they are example CCS projects have you been able to get the examples to build? I assume you are using Starterware and we may need to move this thread to the AM3xx device forum as the folks there have much more expertise with the code examples for Beaglebone.

    However, if you could please provide additional details as to which example you are basing your code on, and the exact errors you see (a screenshot showing the error would be very helpful) we can then redirect it to the correct place.