ts-7000
[Top] [All Lists]

[ts-7000] Re: Error linking to lincan libvca on TS-7350

To:
Subject: [ts-7000] Re: Error linking to lincan libvca on TS-7350
From: "sanjuan34" <>
Date: Mon, 08 Feb 2010 18:05:30 -0000
"-lvca" links to /usr/lib/lincan/libvca.a, which is part of the lincan library, 
as I understand it. Or maybe I should have called it "the lincan package" or 
"the lincan <whatever>", or "ocera framework". The problem I described should 
have still been fairly clear:

vca_open_handle() is function provided by libvca.a. In the source file CANbus.c 
I'm calling vca_open_handle(). That function is declared in can_vca.h, and 
defined in libvca.a; however, I'm receiving the error (as shown below) that the 
function is undefined. 

Maybe the issue isn't the of linking to xxx. Maybe I described it incorrectly. 
Obviously if I understood exactly what the issue was and what was causing it, 
it probably wouldn't be an issue and I probably wouldn't have posted here 
hoping to get the help of someone more experienced than me. 

-Jesse


--- In  Jim Jackson <> wrote:
>
> 
> 
> 
> On Fri, 5 Feb 2010, sanjuan34 wrote:
> 
> > I have a 7350 with a TS-CAN1 on it. No problems loading the kernel 
> > module, but now that I'm starting to write code, I am having problems 
> > linking to libvca. I'm using precompiled lincan-7800.
> >
> >
> > Here's the output from running make (run on the 7350):
> >
> > ts7000:/mnt/nfs/node_controller# make
> > gcc  -Wall  -I/usr/include/lincan -lpthread -L /usr/lib/lincan -lvca  
> > main.o ParseCommand.o CreateTCPServerSocket.o AcceptTCPConnection.o 
> > HandleTCPClient.o TCPSocketServer.o DieWithError.o CANBus.o  -o 
> > arm_nodecontroller
> 
> Where in this gcc invocation does it link to the library lincan?
> 
>   -lvca links in the vca lib
> 
>   -L /usr/lib/lincan   tells it to look in the directory /usr/lib/lincan
>                        to look for libraries specified by the '-l' option
> 
> All this is documented in the man page for gcc.
> 
> 
> 
> > CANBus.o: In function `CANInit':
> > CANBus.c:(.text+0x2c): undefined reference to `vca_open_handle'
> > collect2: ld returned 1 exit status
> > make: *** [arm_nodecontroller] Error 1
> >
> > CANBus.c is pretty simple right now - I didn't make it very far before 
> > running into issues!
> >
> > /* CANBus.c */
> > #include <stdio.h>
> > /* lincan headers */
> > #include <can_vca.h>
> >
> > struct canmsg_t canmsg;
> >
> > int CANInit(void)
> > {
> >
> >
> >  vca_handle_t canhandle;    //create a handle to the can device
> >  const char *candev = "/dev/can0";
> >  printf("Opening %s\n", candev);
> >
> >  /* open the can device */
> >  if ( vca_open_handle(&canhandle, candev, 0, 0) != VCA_OK) {
> >    perror("open");
> >    exit(1);
> >  }
> >
> > }
> >
> >
> >
> >
>




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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU