Error when compiling gst-rtsp-server example
I'm currently trying to setup a Ubuntu server to redistribute a rtsp feed coming from an ip camera.
I saw that the gst-rtsp-server library of gstreamer could help me with this issue.
I installed the following package:
sudo apt-get install libgstrtspserver-1.0-dev
sudo apt-get install gstreamer1.0-rtsp
sudo apt-get install libglib2.0-dev
I then cloned the gst-rtsp-server library repo on my desktop:
git clone https://github.com/GStreamer/gst-rtsp-server.git
But, when I try to compile a C file (gst-rtsp-server/examples/test-launch.c) given as an example of how to use the library using gcc:
gcc test-launch.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
I get the following error:
/tmp/ccM7e45N.o: In function `main':
test-launch.c:(.text+0x2e): undefined reference to `g_option_context_new'
test-launch.c:(.text+0x4a): undefined reference to `g_option_context_add_main_entries'
test-launch.c:(.text+0x4f): undefined reference to `gst_init_get_option_group'
test-launch.c:(.text+0x61): undefined reference to `g_option_context_add_group'
test-launch.c:(.text+0x79): undefined reference to `g_option_context_parse'
test-launch.c:(.text+0x99): undefined reference to `g_printerr'
test-launch.c:(.text+0xa5): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xb1): undefined reference to `g_clear_error'
test-launch.c:(.text+0xc7): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xd6): undefined reference to `g_main_loop_new'
test-launch.c:(.text+0xdf): undefined reference to `gst_rtsp_server_new'
test-launch.c:(.text+0x107): undefined reference to `g_object_set'
test-launch.c:(.text+0x113): undefined reference to `gst_rtsp_server_get_mount_points'
test-launch.c:(.text+0x11c): undefined reference to `gst_rtsp_media_factory_new'
test-launch.c:(.text+0x13a): undefined reference to `gst_rtsp_media_factory_set_launch'
test-launch.c:(.text+0x14b): undefined reference to `gst_rtsp_media_factory_set_shared'
test-launch.c:(.text+0x162): undefined reference to `gst_rtsp_mount_points_add_factory'
test-launch.c:(.text+0x16e): undefined reference to `g_object_unref'
test-launch.c:(.text+0x17f): undefined reference to `gst_rtsp_server_attach'
test-launch.c:(.text+0x19a): undefined reference to `g_print'
test-launch.c:(.text+0x1a6): undefined reference to `g_main_loop_run'
collect2: error: ld returned 1 exit status
There's something I'm missing but I don't know what... ><'
The error is obviously coming from a missing header, but which one and where can I get it?
As always, thanks for the help/tips!
gcc gstreamer rtsp
add a comment |
I'm currently trying to setup a Ubuntu server to redistribute a rtsp feed coming from an ip camera.
I saw that the gst-rtsp-server library of gstreamer could help me with this issue.
I installed the following package:
sudo apt-get install libgstrtspserver-1.0-dev
sudo apt-get install gstreamer1.0-rtsp
sudo apt-get install libglib2.0-dev
I then cloned the gst-rtsp-server library repo on my desktop:
git clone https://github.com/GStreamer/gst-rtsp-server.git
But, when I try to compile a C file (gst-rtsp-server/examples/test-launch.c) given as an example of how to use the library using gcc:
gcc test-launch.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
I get the following error:
/tmp/ccM7e45N.o: In function `main':
test-launch.c:(.text+0x2e): undefined reference to `g_option_context_new'
test-launch.c:(.text+0x4a): undefined reference to `g_option_context_add_main_entries'
test-launch.c:(.text+0x4f): undefined reference to `gst_init_get_option_group'
test-launch.c:(.text+0x61): undefined reference to `g_option_context_add_group'
test-launch.c:(.text+0x79): undefined reference to `g_option_context_parse'
test-launch.c:(.text+0x99): undefined reference to `g_printerr'
test-launch.c:(.text+0xa5): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xb1): undefined reference to `g_clear_error'
test-launch.c:(.text+0xc7): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xd6): undefined reference to `g_main_loop_new'
test-launch.c:(.text+0xdf): undefined reference to `gst_rtsp_server_new'
test-launch.c:(.text+0x107): undefined reference to `g_object_set'
test-launch.c:(.text+0x113): undefined reference to `gst_rtsp_server_get_mount_points'
test-launch.c:(.text+0x11c): undefined reference to `gst_rtsp_media_factory_new'
test-launch.c:(.text+0x13a): undefined reference to `gst_rtsp_media_factory_set_launch'
test-launch.c:(.text+0x14b): undefined reference to `gst_rtsp_media_factory_set_shared'
test-launch.c:(.text+0x162): undefined reference to `gst_rtsp_mount_points_add_factory'
test-launch.c:(.text+0x16e): undefined reference to `g_object_unref'
test-launch.c:(.text+0x17f): undefined reference to `gst_rtsp_server_attach'
test-launch.c:(.text+0x19a): undefined reference to `g_print'
test-launch.c:(.text+0x1a6): undefined reference to `g_main_loop_run'
collect2: error: ld returned 1 exit status
There's something I'm missing but I don't know what... ><'
The error is obviously coming from a missing header, but which one and where can I get it?
As always, thanks for the help/tips!
gcc gstreamer rtsp
add a comment |
I'm currently trying to setup a Ubuntu server to redistribute a rtsp feed coming from an ip camera.
I saw that the gst-rtsp-server library of gstreamer could help me with this issue.
I installed the following package:
sudo apt-get install libgstrtspserver-1.0-dev
sudo apt-get install gstreamer1.0-rtsp
sudo apt-get install libglib2.0-dev
I then cloned the gst-rtsp-server library repo on my desktop:
git clone https://github.com/GStreamer/gst-rtsp-server.git
But, when I try to compile a C file (gst-rtsp-server/examples/test-launch.c) given as an example of how to use the library using gcc:
gcc test-launch.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
I get the following error:
/tmp/ccM7e45N.o: In function `main':
test-launch.c:(.text+0x2e): undefined reference to `g_option_context_new'
test-launch.c:(.text+0x4a): undefined reference to `g_option_context_add_main_entries'
test-launch.c:(.text+0x4f): undefined reference to `gst_init_get_option_group'
test-launch.c:(.text+0x61): undefined reference to `g_option_context_add_group'
test-launch.c:(.text+0x79): undefined reference to `g_option_context_parse'
test-launch.c:(.text+0x99): undefined reference to `g_printerr'
test-launch.c:(.text+0xa5): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xb1): undefined reference to `g_clear_error'
test-launch.c:(.text+0xc7): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xd6): undefined reference to `g_main_loop_new'
test-launch.c:(.text+0xdf): undefined reference to `gst_rtsp_server_new'
test-launch.c:(.text+0x107): undefined reference to `g_object_set'
test-launch.c:(.text+0x113): undefined reference to `gst_rtsp_server_get_mount_points'
test-launch.c:(.text+0x11c): undefined reference to `gst_rtsp_media_factory_new'
test-launch.c:(.text+0x13a): undefined reference to `gst_rtsp_media_factory_set_launch'
test-launch.c:(.text+0x14b): undefined reference to `gst_rtsp_media_factory_set_shared'
test-launch.c:(.text+0x162): undefined reference to `gst_rtsp_mount_points_add_factory'
test-launch.c:(.text+0x16e): undefined reference to `g_object_unref'
test-launch.c:(.text+0x17f): undefined reference to `gst_rtsp_server_attach'
test-launch.c:(.text+0x19a): undefined reference to `g_print'
test-launch.c:(.text+0x1a6): undefined reference to `g_main_loop_run'
collect2: error: ld returned 1 exit status
There's something I'm missing but I don't know what... ><'
The error is obviously coming from a missing header, but which one and where can I get it?
As always, thanks for the help/tips!
gcc gstreamer rtsp
I'm currently trying to setup a Ubuntu server to redistribute a rtsp feed coming from an ip camera.
I saw that the gst-rtsp-server library of gstreamer could help me with this issue.
I installed the following package:
sudo apt-get install libgstrtspserver-1.0-dev
sudo apt-get install gstreamer1.0-rtsp
sudo apt-get install libglib2.0-dev
I then cloned the gst-rtsp-server library repo on my desktop:
git clone https://github.com/GStreamer/gst-rtsp-server.git
But, when I try to compile a C file (gst-rtsp-server/examples/test-launch.c) given as an example of how to use the library using gcc:
gcc test-launch.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
I get the following error:
/tmp/ccM7e45N.o: In function `main':
test-launch.c:(.text+0x2e): undefined reference to `g_option_context_new'
test-launch.c:(.text+0x4a): undefined reference to `g_option_context_add_main_entries'
test-launch.c:(.text+0x4f): undefined reference to `gst_init_get_option_group'
test-launch.c:(.text+0x61): undefined reference to `g_option_context_add_group'
test-launch.c:(.text+0x79): undefined reference to `g_option_context_parse'
test-launch.c:(.text+0x99): undefined reference to `g_printerr'
test-launch.c:(.text+0xa5): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xb1): undefined reference to `g_clear_error'
test-launch.c:(.text+0xc7): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xd6): undefined reference to `g_main_loop_new'
test-launch.c:(.text+0xdf): undefined reference to `gst_rtsp_server_new'
test-launch.c:(.text+0x107): undefined reference to `g_object_set'
test-launch.c:(.text+0x113): undefined reference to `gst_rtsp_server_get_mount_points'
test-launch.c:(.text+0x11c): undefined reference to `gst_rtsp_media_factory_new'
test-launch.c:(.text+0x13a): undefined reference to `gst_rtsp_media_factory_set_launch'
test-launch.c:(.text+0x14b): undefined reference to `gst_rtsp_media_factory_set_shared'
test-launch.c:(.text+0x162): undefined reference to `gst_rtsp_mount_points_add_factory'
test-launch.c:(.text+0x16e): undefined reference to `g_object_unref'
test-launch.c:(.text+0x17f): undefined reference to `gst_rtsp_server_attach'
test-launch.c:(.text+0x19a): undefined reference to `g_print'
test-launch.c:(.text+0x1a6): undefined reference to `g_main_loop_run'
collect2: error: ld returned 1 exit status
There's something I'm missing but I don't know what... ><'
The error is obviously coming from a missing header, but which one and where can I get it?
As always, thanks for the help/tips!
gcc gstreamer rtsp
gcc gstreamer rtsp
edited Mar 20 at 20:58
LoukMo
asked Mar 15 at 19:31
LoukMoLoukMo
387
387
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If this returns something for you:
pkg-config --modversion gstreamer-rtsp-server-1.0
(For me, it returns 1.14.1)
You can use the following gcc command to compile the wanted example:
gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
P.S. in the command, make sure you use backticks ` and not apostrophes '
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1126000%2ferror-when-compiling-gst-rtsp-server-example%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If this returns something for you:
pkg-config --modversion gstreamer-rtsp-server-1.0
(For me, it returns 1.14.1)
You can use the following gcc command to compile the wanted example:
gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
P.S. in the command, make sure you use backticks ` and not apostrophes '
add a comment |
If this returns something for you:
pkg-config --modversion gstreamer-rtsp-server-1.0
(For me, it returns 1.14.1)
You can use the following gcc command to compile the wanted example:
gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
P.S. in the command, make sure you use backticks ` and not apostrophes '
add a comment |
If this returns something for you:
pkg-config --modversion gstreamer-rtsp-server-1.0
(For me, it returns 1.14.1)
You can use the following gcc command to compile the wanted example:
gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
P.S. in the command, make sure you use backticks ` and not apostrophes '
If this returns something for you:
pkg-config --modversion gstreamer-rtsp-server-1.0
(For me, it returns 1.14.1)
You can use the following gcc command to compile the wanted example:
gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
P.S. in the command, make sure you use backticks ` and not apostrophes '
answered Mar 22 at 14:31
LoukMoLoukMo
387
387
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1126000%2ferror-when-compiling-gst-rtsp-server-example%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown