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.

symbol referencing errors

Other Parts Discussed in Thread: CCSTUDIO

Hello,
 
I have an error when I build my project. I use ccstudio 3.1
But I don't know where is the mistake.

this is the code:

#include<stdio.h> //Fichier d'inclusion pour printf, scanf, system...
#include<winsock2.h>//Pour tout se qui touche aux sockets





 void main()
 {
 

    
 SOCKET server;//Le socket qui servira à écouter sur un port
 SOCKET sock;//le socket qui servira à communiquer

 SOCKADDR_IN sinserv; //parametres pour server
 SOCKADDR_IN sin; //parametres pour sock
 
int port;
 
char buffer[50];//Pour stocker les messages
 
 int sinsize;//contiendrz la taille de sin
 int err=0;//pour détecter si la connection est toujours valide
 
 WSADATA wsa;
 WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock

 
 

 printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
 scanf("%i",&port);

 sinserv.sin_family=AF_INET; //Je ne connais pas d'autres familles
 sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
 sinserv.sin_port=htons(port);

 server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
 //SOCK_STREAM pour le TCP
 bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
 //On lie les parametres du socket avec le socket lui meme

 listen(server,0);//On se met à écouter avec server, 0 pour n'accepter qu'une seule connection

 


 while(1)
 {
 sinsize=sizeof(sin);
 if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
 {//accept : accepte n'importe quelle connection
 //Si le socket et valide(si qqn a bien demandé une connection) alors on y va :

 while(err>-1)
 {
 memset(buffer,0,sizeof(buffer));//Ici, c'est la procédure pour envoyer
 err=scanf("%s",buffer);
 send(sock,buffer,sizeof(buffer),0);

 memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
 recv(sock,buffer,sizeof(buffer),0);
 printf("%s\n",buffer);
 }
 }
 }

 }

 

the errors:

[Linking...] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
<Linking>

undefined                        first referenced
 symbol                              in file
---------                        ----------------
_socket                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_recv                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_WSAStartup                      C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_send                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_listen                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_accept                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_htons                           C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_system                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
_bind                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
>>   error: symbol referencing errors - './Debug/soket_serveur.out' not built

>> Compilation failure

Build Complete,
  2 Errors, 60 Warnings, 0 Remarks.

please; i need your help.

 

 

 

  • This error means that the linlker can not find the functions/symbols:

    achraf bouchaala said:
    socket                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _recv                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _WSAStartup                      C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _send                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _listen                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _accept                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _htons                           C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _system                          C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj
    _bind                            C:\CCStudio_v3.1\MyProjects\socket_serveur\serveur.obj

    So you would need to make that these functions are in a library that is included in the project, or that you have a source file with the functions in the project

     

  • thanks a lot MARIANA. I found the solution.

     void main()
     {
     
    #ifdef socket
        IN int af,
        IN int type,
        IN int protocol
    #endif

    #ifdef socket

    ........

    .......

    .......

    #endif
     }

  • Mariana,

    Please help  - I have checked all my .h, .c and I do not use the MCBSP_open command.  In fact, I uninstalled Code Composer and re-installed twice.

    I am trying to run a Reference RF3 without any changes.  When I do a global search it finds app.cdb with a MCBSP_open.

    Here is the link error.  I know that if I used this function called it would have to find the library to resolve the function call at linking time.

    I have run  dosrun.bat

    I have run buildConfig.bat 

    I have run build.bat

    -----------------------------------

    <Linking>

    undefined                        first referenced
     symbol                              in file
    ---------                        ----------------
    _MCBSP_open                      C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _MCBSP_xempty                    C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _MCBSP_start                     C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _MCBSP_config                    C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _MCBSP_xrdy                      C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _MCBSP_write                     C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\dsk6416_edma_aic23.l64
    _EDMA_intFree                    C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_intAlloc                   C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    __IRQ_eventTable                 C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _MCBSP_close                     C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_freeTableEx                C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_intHook                    C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _CACHE_flush                     C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_close                      C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_open                       C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_intDispatcher              C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_freeTable                  C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _IRQ_map                         C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _CACHE_clean                     C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_allocTableEx               C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    _EDMA_allocTable                 C:\\EngineIO_workspace\\SWC_I7_6416\\lib\\c6x1x_edma_mcbsp.l64
    >>   error: symbol referencing errors - './Debug/app.out' not built

    >> Compilation failure

     

  • Carlos,

    Please check this related post that should point you in the right direction: http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/p/11889/46626.aspx#46626

  • Thank you that fix it! 

    I  manually added the csl6416.lib file to my lib and the linker was able to resolve the symbols.