Add prototype
extern "C" void *loaderThrFxn(void *arg);
in C++ source file and compile/link again.
Or modify *.h file like this
#if defined(__cplusplus)
extern "C" {
#endif
void *loaderThrFxn(void *arg);
#if defined(__cplusplus)
};
#endif
>
> 1. How to use/LINK C++ functions with the Programme written in C
> in DVEVM (manas lenka)
>
> Message: 1
> Date: Sat, 14 Jun 2008 22:52:40 +0530 (IST)
> From: manas lenka <[EMAIL PROTECTED]>
> Subject: How to use/LINK C++ functions with the Programme written in C
> in DVEVM
> To: [email protected]
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
> I tried to link some C++ library functions with my own code written in C.
> The C++ libraries have been successfully cross-compiled by
> "arm_v5t_le-g++ -Wall".
> But when I am linking the C++ functions with my code in C( cors-compiled
> with arm_v5t_le-gcc ) I am getting error.
> The command I used for linking is :
> ________________________________________________________________
> /opt/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-g++ -g -O2
> -W -lfreetype -lpng -ljpeg -lpthread -o release/decode release/audio.o
> release/ctrl.o release/display.o release/main.o release/speech.o
> release/ui.o release/video.o decode_config/linker.cmd
> /home/DVEVM-1.20/dvevm_1_20/demos/utils/lib/simplewidget.a
> /home/DVEVM-1.20/dvevm_1_20/demos/utils/lib/msp430lib.a
> /home/DVEVM-1.20/dvevm_1_20/demos/utils/lib/rszcopy.a
> /home/DVEVM-1.20/dvevm_1_20/demos/live/testProgs/loader_th.o
> /home/DVEVM-1.20/dvevm_1_20/demos/live/testProgs/openRTSP.o
> ********************************************************
> But I am getting error as:
> release/main.o(.text+0xcf8): In function `main':
> main.c: undefined reference to `loaderThrFxn'
> collect2: ld returned 1 exit status
> make: *** [release/decode] Error 1
> *****************************************************
> The void *loaderThrFxn(void *arg) is defined in the loader_th.cpp
> function(i.e in
> /home/DVEVM-1.20/dvevm_1_20/demos/live/testProgs/loader_th.o).
>
> Can any-body tell me why I am unable to link the function defined in .cpp
> file
>
> Any help will be highly appreciated.
> Thanks
> MANAS KUMAR
>
>
>
>
> Bollywood, fun, friendship, sports and more. You name it, we have it
> on http://in.promos.yahoo.com/groups/bestofyahoo/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://linux.omap.com/pipermail/davinci-linux-open-source/attachments/20080614/761103d0/attachment-0001.htm
>
> ------------------------------
>
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source