Hi, I am trying to write a program that uses the NDK to create a TCP IP Connection and send some data to a PC (server). I am using the C6748 DSP. I get the following errors:
Description Resource Path Location Type
unresolved symbol NIMUDeviceTable, first referenced in C:\ti\tirtos_c6000_2_00_01_23\products\ndk_2_23_01_01\packages\ti\ndk\stack\lib\stk.ae674<nimu.oe674> userMade C/C++ Problem
Description Resource Path Location Type
unresolved symbol NetworkOpen, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem
Description Resource Path Location Type
unresolved symbol NetworkClose, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem
Description Resource Path Location Type
unresolved symbol main, first referenced in C:\ti\ccsv6\tools\compiler\ti-cgt-c6000_8.1.0\lib\rts6740_elf.lib<args_main.obj> userMade C/C++ Problem
Description Resource Path Location Type
unresolved symbol IPAddr, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem
Description Resource Path Location Type
<a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain userMade C/C++ Problem
Description Resource Path Location Type
#10010 errors encountered during linking; "userMade.out" not built userMade C/C++ Problem
My program is:
#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/knl/Task.h>
#include <netmain.h>
#include <string.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/hal/Timer.h>
#include <xdc/cfg/global.h>
#include <stdio.h>
#include <stdlib.h>
int main(void){
char *pBuf= 0;
struct sockaddr sin1;
struct timeval timeout;
fdOpenSession(TaskSelf());
SOCKET s= socket(AF_INET,SOCK_STREAM,IPPROTO_TCP;
if (s<0){
print("failed at socket %d \n", errno());
}
//setsockopt();
//bind();
bzero(&sin1, sizeof(struct sockaddr));
sin1.sin_family= AF_INET;
sin1.sin_addr.s_addr= 169.254.250.129;
sin1.sin_port= htons(7);
timeout.tv_sec=5;
timeout.tv_usec= 0;
setsockopt(s,SOL_SOCKET,SO_SNDTIMEO,&timeout,sizeof(timeout));
if (connect(s,(PSA)&sin1,sizeof(sin1))<0){
printf("failed at connect %d \n", errno());
}
//fdPoll();
if (!(pBuf= malloc(4096))){
print("failed at buffer allocation %d \n", errno());
}
for(i=0;i<4096;i++){
*(pBuf+1)=(char)I;
}
if (send(s,pBuf,4096,0)<0){
print("failed at send %d \n", errno());
}
fdCloseSession(TaskSelf());
TaskExit(TaskSelf());
}
I don't know what to do to get past this or where I have gone wrong. Any help or alternative code will be useful. Thanks