0
嗨,我是想用化妝來編譯Debian的喘息armHF這個代碼,但它不工作它總是給我這個錯誤在/ usr /斌/勞工處:找不到-lstdC++
我找到了lstdC++。所以,但它看起來是直接存取權限,而不是原始文件
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>
int main (int argc, char *argv[])
{
GMainLoop *loop;
GstRTSPServer *server;
GstRTSPMediaMapping *mapping;
GstRTSPMediaFactory *factory;
gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);
server = gst_rtsp_server_new();
mapping = gst_rtsp_server_get_media_mapping (server);
factory = gst_rtsp_media_factory_new();
gst_rtsp_media_factory_set_launch (factory,
"(mfw_v4lsrc capture-mode=0 is-live=1 ! vpuenc codec=0 ! rtpmp4vpay send-config=true name=pay0 pt=96)");
gst_rtsp_media_factory_set_shared (factory, TRUE);
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
g_object_unref (mapping);
gst_rtsp_server_attach (server, NULL);
g_main_loop_run (loop);
return 0;
}
一個與此生成的文件
CPPFLAGS += -I. -I$(top_builddir)/include -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/libxml2 -I/usr/lib/glib-2.0/include -I/usr/include/gstreamer-0.10/gst/rtsp-server/
OBJ = rtsptest.o
%.o: %.c $(DEPS)
$(CC) -c -o [email protected] $< $(CPPFLAGS)
rtsptest: $(OBJ)
$(CC) -o [email protected] $^ $(LDFLAGS) $(CPPFLAGS) -pthread -lstdc++ -lgstreamer-0.10 -lgstrtsp-0.10 -lgstrtspserver-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lm
clean:
rm *.o
rm test
謝謝,但我發現問題,這是一個斷開的鏈接,我研究瞭如何修復它並編譯。 – user3749635