Re: hxclientkit question / testkit Command Line
Tran Hoang Thanh <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniel,
Thanks a lot for your time spending with my issue :).
I followed your instruction, just used the main.cpp in test folder to test your compilation method.
> > 3. When I read makefile in "test" folder, I
> saw this file
> > testkit_libs.a, I supposed that it was created by the
> following line
> >
> > python $(BUILD_ROOT)/bin/armerge.py -a ar -d
> dbg/obj/lib
> > dbg/testkit_libs.a $(STATIC_LIBS)
> >
> > May you tell me what does this file use for?
>
> This is the detail of how Ribosome merge object files and
> specified
> static libraries into a single temporary library to be
> linked against
> the final executable.
>
> Your problem could be caused by not having constructed the
> right
> compiler command line yet.
>
> To figure out the include paths, library paths, and
> libraries needed in
> the compilation, just look at the command lines scrolled by
> on the screen:
>
> $ umake -t release
> $ make clean
> $ make
>
> g++ -pipe -Wall -Wreturn-type -Wno-non-virtual-dtor
> -fno-exceptions
> --permissive -Wno-ctor-dtor-privacy -fno-rtti
> -ffunction-sections
> -fdata-sections -march=pentium -mcpu=pentium
> -ffunction-sections
> -fdata-sections -O2 -I../../../common/runtime/pub
> -I/usr/X11R6/include
> -I../../../player/hxclientkit/pub -I./pub -I. -include
> rel/player_hxclientkit_test_ribodefs.h -o rel/obj/main.o -c
> main.cpp
>
> python source/build/bin/armerge.py -a ar -d rel/obj/lib
> rel/testkit_libs.a
> ../../../player/hxclientkit/rel/libhxclient.a
>
> g++ -o rel/testkit rel/obj/main.o rel/testkit_libs.a
> -L/usr/X11R6/lib
> -lX11 -lpthread -ldl
>
> The first compile line above showed that you will probably
> need the
> following header paths:
> common/runtime/pub -- Not needed.
> /usr/X11R6/include
> player/hxclientkit/pub
> player/hxclientkit/test/rel/player_hxclientkit_test_ribodefs.h
> -- This
> is the entire list of macro generated by Ribosome. Not
> needed.
>
> The library paths needed:
> /usr/X11R6/lib
>
> Shared Libraries Needed:
> -lX11 -lpthread -ldl
>
> Static Library Needed:
> player/hxclientkit/test/rel/testkit_libs.a -- I think it is
> the same as
> libhxclient.a.
>
>
> Umakefil:
>
> project.AddModuleIncludes('player/hxclientkit/pub')
>
> project.AddModuleLibraries('player/hxclientkit[libhxclient]')
>
> All the above suggested that the command line for testkit
> is "simply":
>
> export HELIX_SRC_ROOT=$HELIX_ROOT/source
>
> g++ -o testkit
> ${HELIX_SRC_ROOT}/player/hxclientkit/test/main.cpp -Wall
> -march=pentium -O2
> -I${HELIX_SRC_ROOT}/player/hxclientkit/pub
> -I/usr/X11R6/include
> ${HELIX_SRC_ROOT}/player/hxclientkit/rel/libhxclient.a
> -L/usr/X11R6/lib
> -lX11 -lpthread -ldl
>
> (Change rel to dbg if necessary.)
>
> I stumbled when constructing the above command line when I
> put the
> source file, main.cpp, at the end of g++ command line. The
> linker
> emitted this in the case:
> main.cpp:(.text+0xc9): undefined reference to
> `ClientPlayerCreate'
> main.cpp:(.text+0x100): undefined reference to
> `ClientPlayerOpenURL'
>
> I suppose that is just a matter of linker's symbol
> resolution sequence,
> but I'm not familiar with the linker rules.
>
> Is that what you stumbled upon too? If so, just move
> main.cpp to the
> front of the command line.
Can you run the testkit by this method? I did the same.
mobile-odh-root@LinuxPC3:~/Thanh/C++/HelixTest2$ export HELIX_SRC_ROOT=/home/mobile-odh-root/HelixDNA/helix
mobile-odh-root@LinuxPC3:~/Thanh/C++/HelixTest2$ g++ -o dbg/testkit /home/mobile-odh-root/Thanh/C++/HelixTest2/main.cpp -Wall -march=pentium -O2 -I${HELIX_SRC_ROOT}/player/hxclientkit/pub -I/usr/X11R6/include ${HELIX_SRC_ROOT}/player/hxclientkit/dbg/libhxclient.a -L/usr/X11R6/lib -lX11 -lpthread -ldl
mobile-odh-root@LinuxPC3:~/Thanh/C++/HelixTest2$
There was no error. However, I did not manage to run testkit file. I only got the following messages
mobile-odh-root@LinuxPC3:~/Thanh/C++/HelixTest2$ HX_DEBUGLEVEL=2 HELIX_LIBS=/usr/local/helix/HelixPlayer dbg/testkit file:///home/mobile-odh-root/Thanh/C++/Streaming/1.ogg
HX_ASSERT failed: (m_pIPrefs)... File plghand2.cpp, Line 6259
OnVolumeChanged
HX_ASSERT failed: (m_pPreferences)... File hxflsrc.cpp, Line 351
OnContentStateChanged
OnTitleChanged
Then, it hung there (The new window did not appear). So, I had to press Ctrl+C to stop it.
By the way, again, thanks a lot for your time.
Best regards,
Tran Hoang Thanh
>
>
> --
> Daniel Yek.
>
>
>
> > By the way, thanks a lot for your help and passion :)
> >
> >
> > Best regards,
> >
> > Tran Hoang Thanh
> >
> >
> >
> > --- On Wed, 8/6/08, Daniel Yek <[email protected]>
> wrote:
> >
> >
> >> From: Daniel Yek <[email protected]>
> >> Subject: Re: [Helix-client-dev] hxclientkit
> question
> >> To: "Tran Hoang Thanh"
> <[email protected]>,
> [email protected]
> >> Date: Wednesday, August 6, 2008, 8:43 AM
> >> Tran Hoang Thanh wrote:
> >>
> >>> 1. I successfully compiled and run the
> >>>
> >> "main.cpp" in test folder with
> >>
> >>> ogg file. In fact, a new windows appeared but
> I could
> >>>
> >> not hear the
> >>
> >>> sound, may it be the problem with sound
> driver? By the
> >>>
> >> way, thanks a
> >>
> >>> lot for your help
> >>>
> >> It could be that Helix client is defaulting to
> OSS, instead
> >> of ALSA. Try
> >> changing/adding the following line in the resource
> >> (Preference) file.
> >> SoundDriver=3
> >>
> >> Possible resource file path are:
> >> ~/.helix/HelixSDK_10_0
> >> ~/.realnetworks/RealMediaSDK_1_0
> >>
> >> You can always delete them and see if one of them
> is
> >> recreated after
> >> running the app.
> >>
> >> --
> >> Daniel Yek.
> >>
> >>
> >>
> >>
> >>> 2. I tested to compile "main.cpp"
> with
> >>>
> >> eclipse since my job is to
> >>
> >>> integrate helix DNA into another existing
> multimedia
> >>>
> >> project. I was
> >>
> >>> not quite sure about which directories I
> should
> >>>
> >> include, so I just
> >>
> >>> included ../player/hxclientkit/pub and
> >>> player/hxclientkit/dbg/libhxclient.a.
> >>> Then, I got the following error
> >>>
> >>> Description Resource Path Location Type
> >>> make: *** [HelixTest] Error 1 HelixTest 0
> C/C++
> >>>
> >> Problem
> >>
> >>> undefined reference to `ClientPlayerClose'
> >>>
> >> main.cpp HelixTest 295
> >>
> >>> C/C++ Problem
> >>> undefined reference to
> `ClientPlayerCreate'
> >>>
> >> main.cpp HelixTest 251
> >>
> >>> C/C++ Problem
> >>> undefined reference to
> `ClientPlayerOpenURL'
> >>>
> >> main.cpp HelixTest 253
> >>
> >>> C/C++ Problem
> >>> undefined reference to `ClientPlayerPlay'
> main.cpp
> >>>
> >> HelixTest 254 C/C++
> >>
> >>> Problem
> >>>
> >>> Do you have any idea or suggestion? Thanks a
> lot for
> >>>
> >> your time
> >>
> >>> Best regards,
> >>>
> >>> Tran Hoang Thanh
> >>>
> >>>
> >>>
> >>> --- On Tue, 8/5/08, Daniel Yek
> <[email protected]>
> >>>
> >> wrote:
> >>
> >>>> From: Daniel Yek <[email protected]>
> >>>> Subject: Re: [Helix-client-dev]
> hxclientkit
> >>>>
> >> question
> >>
> >>>> To: "Tran Hoang Thanh"
> >>>>
> >> <[email protected]>
> >>
> >>>> Cc: [email protected]
> >>>> Date: Tuesday, August 5, 2008, 4:11 AM
> >>>> Tran Hoang Thanh wrote:
> >>>>
> >>>>
> >>>>> Hi Daniel,
> >>>>>
> >>>>> Thanks a lot for your instruction, I
> will test
> >>>>>
> >> with
> >>
> >>>>>
> >>>>>
> >>>> ogg files soon (I
> >>>>
> >>>>
> >>>>> am at home now :))
> >>>>>
> >>>>> I still have other questions:
> >>>>>
> >>>>> 1. What is the difference between
> Helix player
> >>>>>
> >> and
> >>
> >>>>>
> >>>>>
> >>>> Helix Client?
> >>>>
> >>>> Helix Player is the Top-level GUI project
> using
> >>>>
> >> Helix
> >>
> >>>> client.
> >>>> Helix Player is a shipping product.
> >>>>
> >>>> Helix client is the Helix (client-side)
> >>>>
> >> infrastructure,
> >>
> >>>> which is used in
> >>>> all players based on Helix (such as the
> player for
> >>>>
> >> Symbian,
> >>
> >>>> MID, etc.),
> >>>> and can be thought of as the splay (Simple
> PLAYer)
> >>>>
> >> command
> >>
> >>>> line program.
> >>>>
> >>>> Splay is a test app. used extensively in
> Helix
> >>>>
> >> client core
> >>
> >>>> development.
> >>>> It is not a shipping product.
> >>>>
> >>>>
> >>>>
> >>>>> 2. May you give me instruction to
> build a
> >>>>>
> >> simple app
> >>
> >>>>>
> >>>>>
> >>>> which use
> >>>>
> >>>>
> >>>>> hxclientkit as API to call Helix DNA
> >>>>>
> >> client's
> >>
> >>>>>
> >>>>>
> >>>> library?
> >>>>
> >>>> You have been looking at it! The simple
> app., the
> >>>> hxclientkit testkit, is:
> >>>> player/hxclientkit/test/main.cpp
> >>>>
> >>>> A more complicated one with GTK+ GUI
> called
> >>>>
> >> gtktest is at:
> >>
> >>>> player/gtk/test/main.cpp
> >>>>
> >>>>
> >>>>
> >>
> https://player.helixcommunity.org/2005/dev/overview.html
> >>
> >>>>
> >>>>
> >>>>> I tested to build the main.cpp (the
> file was
> >>>>>
> >> in
> >>
> >>>>>
> >>>>>
> >>>> "test" folder), but it
> >>>>
> >>>>
> >>>>> failed with error like
> "***error". I
> >>>>>
> >>>>>
> >>>> included
> >>>>
> >>>>
> >>>>
> >>
> |$HELIX_ROOT/source/player/hxclientkit/dbg/libhxclient.so.1.0|.
> >>
> >>>> as a
> >>>>
> >>>>
> >>>>> shared library (I used eclipse as IDE)
>
> >>>>>
> >>>>>
> >>>> We only support building testkit and
> gtktest using
> >>>> Ribosome's build.py
> >>>> or umake.py commands. If you want to use
> Eclipse
> >>>>
> >> to build
> >>
> >>>> them, you can
> >>>> figure out the libraries necessary by
> examining
> >>>>
> >> the
> >>
> >>>> Makefile generated
> >>>> by umake.py. It shouldn't be
> difficult.
> >>>>
> >>>>
> >>>> --
> >>>> Daniel Yek.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> but there was still error. So, do I
> need to
> >>>>>
> >> include
> >>
> >>>>>
> >>>>>
> >>>> other libraries in
> >>>>
> >>>>
> >>>>> compilation process?
> >>>>> Thanks a lot for your time and help so
> far
> >>>>>
> >>>>>
> >>>>> Best regards,
> >>>>>
> >>>>> Tran Hoang Thanh
> >>>>>
> >>>>>
> >>>>> --- On *Mon, 8/4/08, Daniel Yek
> >>>>>
> >>>>>
> >>>> /<[email protected]>/* wrote:
> >>>>
> >>>>
> >>>>> From: Daniel Yek <[email protected]>
> >>>>> Subject: Re: [Helix-client-dev]
> hxclientkit
> >>>>>
> >> question
> >>
> >>>>> To: "Tran Hoang Thanh"
> >>>>>
> >>>>>
> >>>> <[email protected]>
> >>>>
> >>>>
> >>>>> Cc:
> [email protected]
> >>>>> Date: Monday, August 4, 2008, 11:11 PM
> >>>>>
> >>>>> Tran Hoang Thanh wrote:
> >>>>>
> >>>>>
> >>>>>> <snip>
> >>>>>> I tested with your suggestion, but
> I have
> >>>>>>
> >> the
> >>
> >>>>>>
> >>>>>>
> >>>> following error:
> >>>>
> >>>>
> >>>>>>
> >>>>>>
> >>
> mobile-odh-root@LinuxPC3:~/HelixDNA/helix/player/hxclientkit/test$
> >>
> >>>>
> >>>>
> >>>>>> HX_DEBUGLEVEL=2
> >>>>>>
> >>>>>>
> >>>> HELIX_LIBS=/usr/local/helix/HelixPlayer
> >>>>
> >> dbg/testkit
> >>
> >>>>
> >>>>
> >>>>
> >>
> file:///home/mobile-odh-root/Thanh/C++/Streaming/1.mp3
> >>
> >>>>
> >>>>
> >>>>> Hi Tran,
> >>>>>
> >>>>> Helix Player (the specific player
> product!)
> >>>>>
> >> only
> >>
> >>>>>
> >>>>>
> >>>> supports Open Source
> >>>>
> >>>>
> >>>>> (GPL-licensed) codecs. MP3 is
> >>>>>
> >> patent-incumbered and
> >>
> >>>>>
> >>>>>
> >>>> thus cannot be
> >>>>
> >>>>
> >>>>> supported as part of its GPL-licensed
> codecs.
> >>>>>
> >>>>> Try OGG clips, or either use
> RealPlayer or
> >>>>>
> >> Helix
> >>
> >>>>>
> >>>>>
> >>>> client (which isn't
> >>>>
> >>>>
> >>>>> shipped as a product; as opposed to
> Helix
> >>>>>
> >> Player);
> >>
> >>>>>
> >>>>>
> >>>> both of these
> >>>>
> >>>>
> >>>>> supports MP3.
> >>>>>
> >>>>> --
> >>>>> Daniel Yek.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> HX_ASSERT failed: (m_pIPrefs)...
> File
> >>>>>>
> >>>>>>
> >>>> plghand2.cpp, Line 6259
> >>>>
> >>>>
> >>>>>> OnVolumeChanged
> >>>>>> HX_ASSERT failed:
> (m_pPreferences)... File
> >>>>>>
> >>>>>>
> >>>> hxflsrc.cpp, Line 351
> >>>>
> >>>>
> >>>>>> OnContentStateChanged
> >>>>>> OnTitleChanged
> >>>>>> HX_ASSERT failed:
> (m_pPreferences)... File
> >>>>>>
> >>>>>>
> >>>> hxflsrc.cpp, Line 351
> >>>>
> >>>>
> >>>>>> OnGroupsChanged
> >>>>>> OnErrorOccurred
> >>>>>>
> >>>>>> Do you have any idea for this?
> Thanks in
> >>>>>>
> >> advance.
> >>
> >>>>>> Best regards,
> >>>>>>
> >>>>>> Tran Hoang
> >>>>>>
> >>>>>>
> >>>>> Thanh
> >>>>>
> >>>>>
> >>>>>> --- On Sat, 8/2/08, Daniel Yek
> >>>>>>
> >>>>>>
> >>>> <[email protected]> wrote:
> >>>>
> >>>>
> >>>>>>> From: Daniel Yek
> <[email protected]>
> >>>>>>> Subject: Re:
> [Helix-client-dev]
> >>>>>>>
> >> hxclientkit
> >>
> >>>>>>>
> >>>>>>>
> >>>> question
> >>>>
> >>>>
> >>>>>>> To: "Tran Hoang
> Thanh"
> >>>>>>>
> >>>>>>>
> >>>> <[email protected]>
> >>>>
> >>>>
> >>>>>>> Cc:
> >>>>>>>
> >> [email protected]
> >>
> >>>>>>> Date: Saturday, August 2,
> 2008, 2:30
> >>>>>>>
> >> AM
> >>
> >>>>>>> Tran Hoang Thanh wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> I successfully built
> hxclientkit
> >>>>>>>>
> >> with
> >>
> >>>>>>>>
> >>>>>>>>
> >>>> your
> >>>>
> >>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> instruction. I also tested
> with
> >>>>>>>
> >>>>>>>
> >>>> "test" folder. I
> >>>>
> >>>>
> >>>>>>> also followed with
> "python
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> /home/mobile-odh-root/HelixDNA/build/bin/umake.py" to
> >>
> >>>>
> >>>>
> >>>>>>> create makefile in
> "test"
> >>>>>>>
> >> folder.
> >>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> The messages were as
> follows:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>
> mobile-odh-root@LinuxPC3:~/HelixDNA/helix/player/hxclientkit/test$
> >>
> >>>>
> >>>>
> >>>>>>> sudo
> >>>>>>>
> >>>>>>>
> >>>>> python
> >>>>>
> >>>>>
> >>>>
> /home/mobile-odh-root/HelixDNA/build/bin/umake.py
> >>>>
> >>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> <snip>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> g++ -o dbg/testkit
> dbg/obj/main.o
> >>>>>>>>
> >>>>>>>>
> >>>> dbg/testkit_libs.a
> >>>>
> >>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> -L/usr/X11R6/lib -lX11
> -lpthread -ldl
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> rm
> "dbg/testkit_libs.a"
> >>>>>>>>
> >>>>>>>> Am I right when assuming
> that
> >>>>>>>>
> >> there was
> >>
> >>>>>>>>
> >>>>>>>>
> >>>> no error?
> >>>>
> >>>>
> >>>>>>>> However, when I tested
> >>>>>>>>
> >>>>>>>>
> >>>> "testkit" in
> >>>>
> >>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> "dbg" folder I got
> error as
> >>>>>>>
> >>>>>>>
> >>>> follows:
> >>>>
> >>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>
> mobile-odh-root@LinuxPC3:~/HelixDNA/helix/player/hxclientkit/test$
> >>
> >>>>
> >>>>
> >> HELIX_LIBS=/usr/local/helix/HelixPlayer
> >>
> >>>>>>>
> >>>>>>>
> >>>> dbg/testkit
> >>>>
> >>>>
> >>>>
> >>
> file:///home/mobile-odh-root/Thanh/C++/Streaming/1.mp3
> >>
> >>>>
> >>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> HX_ASSERT failed:
> (m_pIPrefs)...
> >>>>>>>>
> >> File
> >>
> >>>>>>>>
> >>>>>>>>
> >>>> plghand2.cpp,
> >>>>
> >>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> Line
> >>>>>>>
> >>>>>>>
> >>>>> 6259
> >>>>>
> >>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Aborted (core dumped)
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> That is a debug assertion
> about
> >>>>>>>
> >> Preferences
> >>
> >>>>>>>
> >>>>>>>
> >>>> that can be
> >>>>
> >>>>
> >>>>>>> ignored.
> >>>>>>>
> >>>>>>> Try this:
> >>>>>>> $ HX_DEBUGLEVEL=2
> >>>>>>>
> >>>>>>>
> >>>> HELIX_LIBS=/usr/local/helix/HelixPlayer
> >>>>
> >>>>
> >>>>>>> dbg/testkit
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> file:///home/mobile-odh-root/Thanh/C++/Streaming/1.mp3
> >>
> >>>>
> >>>>
> >>>>>>> Setting debug level to 2
> causes the
> >>>>>>>
> >> assert to
> >>
> >>>>>>>
> >>>>>>>
> >>>> print out the
> >>>>
> >>>>
> >>>>>>> same error
> >>>>>>> message and then ignore it.
> >>>>>>>
> >>>>>>> --
> >>>>>>> Daniel Yek.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> For your information, I do
> not
> >>>>>>>>
> >> have
> >>
> >>>>>>>>
> >>>>>>>>
> >>>> RealPlayer, I only
> >>>>
> >>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> installed HelixPlayer in
> >>>>>>>
> >>>>>>>
> >> "/usr/local/helix/HelixPlayer". In
> >>
> >>>>>>>
> >>>>>>>
> >>>> this folder, I
> >>>>
> >>>>
> >>>>>>> saw: "Bin",
> >>>>>>>
> >> "codecs",
> >>
> >>>>>>> "common",
> "doc",
> >>>>>>>
> >>>>>>>
> >>>> "mozilla",
> >>>>
> >>>>
> >>>>>>> "plugins",
> >>>>>>>
> >> "postinst",
> >>
> >>>>>>>
> >>>>>>>
> >>>> "share"
> >>>>
> >>>>
> >>>>>>> folders and
> >>>>>>>
> >>>>>>>
> >>>>> hxplay, hxplay.bin, install.log,
> license,
> >>>>>
> >> readme
> >>
> >>>>>
> >>>>>
> >>>>>>> files.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Thanks a lot for your time
> and
> >>>>>>>>
> >> support so
> >>
> >>>>>>>>
> >>>>>>>>
> >>>> far.
> >>>>
> >>>>
> >>>>>>>> Best regards,
> >>>>>>>>
> >>>>>>>> Tran Hoang Thanh
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>
_______________________________________________
Helix-client-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev