How to compile .cpp file

Mo Cheng chengmo03013106 at gmail.com
Mon Sep 5 23:46:41 PDT 2011


Nice to meet you~
All Chinese, hah~
I guess you missed some header or libs and there is not complier 's buiness~


2011/8/29 Zhang, Zheng <zheng.zhang at intel.com>

> Seems you made an error in include
>
> -----Original Message-----
> From: gstreamer-devel-bounces+zheng.zhang=intel.com at lists.freedesktop.org[mailto:
> gstreamer-devel-bounces+zheng.zhang=intel.com at lists.freedesktop.org] On
> Behalf Of 宋喜佳
> Sent: Saturday, August 27, 2011 7:55 PM
> To: gstreamer-devel at lists.freedesktop.org
> Subject: How to compile .cpp file
>
> Hi friends,
>  I have wrte a simple application with c++, but now I do not know how to
> compile it. when I use gcc, a error comes out. Just like:
>
> [linux-devkit]:~/myTest_host/audio-player> arm-none-linux-gnueabi-gcc -Wall
> $(pkg-config --cflags --libs gstreamer-0.10) audio-player.cpp audio-player.h
> -lz
> audio-player.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'AudioPlayer'
> [linux-devkit]:~/myTest_host/audio-player>
>
> when I change to g++ ,another error occurred, just like:
>
> [linux-devkit]:~/myTest_host/audio-player> arm-none-linux-gnueabi-g++ -Wall
> $(pkg-config --cflags --libs gstreamer-0.10) audio-player.cpp audio-player.h
> -lz
>
> /root/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/usr/lib/crt1.o:
> In function `_start':
> init.c:(.text+0x30): undefined reference to `main'
> collect2: ld returned 1 exit status
> [linux-devkit]:~/myTest_host/audio-player>
>
>
> Please help me to compile a .cpp file !
> thanks!
>
> --
>>>
> 联系人:宋喜佳
> 办公室座机:0431-84627053-8336
> 手机:15044157175
> QQ:870578087
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110906/d27ef4b9/attachment.htm>


More information about the gstreamer-devel mailing list