How to compile .cpp file

Zhang, Zheng zheng.zhang at intel.com
Sun Aug 28 17:54:54 PDT 2011


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


More information about the gstreamer-devel mailing list