ts-7000
[Top] [All Lists]

Re: [ts-7000] Undefined references when using libvca

To:
Subject: Re: [ts-7000] Undefined references when using libvca
From: Jim Jackson <>
Date: Tue, 9 Feb 2010 23:20:37 +0000 (GMT)


On Tue, 9 Feb 2010, sanjuan34 wrote:

> Lemme try this again...
>
> I'm using a TS-CAN1 on a TS-7350. When I attempt to use a function from 
> libvca, I'm receiving an error during linking stating that the function I'm 
> calling is an undefined reference. I'm getting this error both compiling on 
> the TS, and cross-compiling on a linux box (with arm-linux-gcc).
>
> To try to figure this out I've simplified things as much as I can. Here's the 
> error I'm getting:
>
> gcc -I/usr/include/ocera -L/usr/lib/ocera   -lvca  CANBus.o  -o 
> arm_nodecontroller

from what you say below, gcc is obviously not seeing the lib.
Ok simple questions - which directory is the library file libvca.a in?
Is that directory in the gcc library search path?
Is it readable by the user running the gcc?
What is the output of

    cd directory_containing_libvca.a
    file libvca.a
    ar t libvca.a



>
> CANBus.o: In function `main':
> CANBus.c:(.text+0x38): undefined reference to `vca_open_handle'
> collect2: ld returned 1 exit status
>
> CANBus.c looks like this (like I said, I've stripped nearly everything out):
>
> #include "can_vca.h"
>
> int main(void)
> {
>  vca_handle_t canhandle;
>  const char *candev = "/dev/can0";
>
>  vca_open_handle(&canhandle, candev, 0, 0);
>
> }
>
> As a test I've tried other functions from libvca and gotten the same error. 
> I'm really at a loss here, and I'm not sure where to proceed.
>
> Thanks
> -Jesse
>
>
>


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

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