Nice to meet you~<div>All Chinese, hah~</div><div>I guess you missed some header or libs and there is not complier &#39;s buiness~</div><div><br></div><div><br><div class="gmail_quote">2011/8/29 Zhang, Zheng <span dir="ltr">&lt;<a href="mailto:zheng.zhang@intel.com">zheng.zhang@intel.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Seems you made an error in include<br>
<div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: gstreamer-devel-bounces+zheng.zhang=<a href="mailto:intel.com@lists.freedesktop.org">intel.com@lists.freedesktop.org</a> [mailto:<a href="mailto:gstreamer-devel-bounces%2Bzheng.zhang">gstreamer-devel-bounces+zheng.zhang</a>=<a href="mailto:intel.com@lists.freedesktop.org">intel.com@lists.freedesktop.org</a>] On Behalf Of 宋喜佳<br>

Sent: Saturday, August 27, 2011 7:55 PM<br>
To: <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
Subject: How to compile .cpp file<br>
<br>
Hi friends,<br>
 &nbsp;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:<br>
<br>
[linux-devkit]:~/myTest_host/audio-player&gt; arm-none-linux-gnueabi-gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) audio-player.cpp audio-player.h -lz<br>
audio-player.h:6: error: expected &#39;=&#39;, &#39;,&#39;, &#39;;&#39;, &#39;asm&#39; or &#39;__attribute__&#39; before &#39;AudioPlayer&#39;<br>
[linux-devkit]:~/myTest_host/audio-player&gt;<br>
<br>
when I change to g++ ,another error occurred, just like:<br>
<br>
[linux-devkit]:~/myTest_host/audio-player&gt; arm-none-linux-gnueabi-g++ -Wall $(pkg-config --cflags --libs gstreamer-0.10) audio-player.cpp audio-player.h -lz<br>
/root/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/usr/lib/crt1.o:<br>
In function `_start&#39;:<br>
init.c:(.text+0x30): undefined reference to `main&#39;<br>
collect2: ld returned 1 exit status<br>
[linux-devkit]:~/myTest_host/audio-player&gt;<br>
<br>
<br>
Please help me to compile a .cpp file !<br>
thanks!<br>
<br>
--<br>
 &nbsp; &nbsp; 致<br>
礼<br>
<br>
联系人:宋喜佳<br>
办公室座机:0431-84627053-8336<br>
手机:15044157175<br>
QQ:870578087<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br></div>