Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 4.3.0, cdrdao-1.2.2-r1 and a bit of programming C++
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
DocWario
n00b
n00b


Joined: 16 Sep 2003
Posts: 15
Location: Paris - France

PostPosted: Sun May 04, 2008 12:17 pm    Post subject: GCC 4.3.0, cdrdao-1.2.2-r1 and a bit of programming C++ Reply with quote

Hi all,

I'm trying installing Gnome 2.22.1 with Gcc 4.3.0 but I have some problems with cdrdao.
Apparently, it's just some header problem, I think I resolved it but could you explain it ?

While compiling file cdrdao-1.2.2/trackdb/FormatMp3.cc it was complaining about memset and strerror, so I just added #include <string.h>
but in this file, it include util.h which contains #include <string>.
Are they different ? I mean <string.h> is the C version and <string> the C++ version ?

As now it is compiling fine, how do I create a patch and where do I have to submit it ?
If I install it with "ebuild /usr/portage..../cdrdao.ebuild install qmerge", will the package recorded in my world ?

Thanks, and sorry if I'm not posted in the right category.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6279

PostPosted: Sun May 04, 2008 12:37 pm    Post subject: Re: GCC 4.3.0, cdrdao-1.2.2-r1 and a bit of programming C++ Reply with quote

Your particular problem has already patches in app-cdr/cdrdao-1.2.2-r1

Anyway, to your question: <string> contains the c++ string class. <string.h> contains the C string functions (like the ones which were missing).
However, if you are writing a C++ program you should not include the C header <string.h> but preferably the C++ header <cstring> (which is more or less the same as <string.h> but might contain things like extern "C" to link properly mixed C/C++-code and might also replace some C-macros by C++ functions or do similar C++-specific improvements)
Back to top
View user's profile Send private message
DocWario
n00b
n00b


Joined: 16 Sep 2003
Posts: 15
Location: Paris - France

PostPosted: Sun May 04, 2008 12:42 pm    Post subject: Reply with quote

Thanks for the quick answer.

Well it looks like this one header was missed when submitting patch because i was trying to emerge cdrdao-1.2.2-r1
Back to top
View user's profile Send private message
unK
l33t
l33t


Joined: 06 Feb 2007
Posts: 769

PostPosted: Sun May 04, 2008 12:44 pm    Post subject: Re: GCC 4.3.0, cdrdao-1.2.2-r1 and a bit of programming C++ Reply with quote

DocWario wrote:
Hi all,

I'm trying installing Gnome 2.22.1 with Gcc 4.3.0 but I have some problems with cdrdao.
Apparently, it's just some header problem, I think I resolved it but could you explain it ?

While compiling file cdrdao-1.2.2/trackdb/FormatMp3.cc it was complaining about memset and strerror, so I just added #include <string.h>
but in this file, it include util.h which contains #include <string>.
Are they different ? I mean <string.h> is the C version and <string> the C++ version ?

As now it is compiling fine, how do I create a patch and where do I have to submit it ?
If I install it with "ebuild /usr/portage..../cdrdao.ebuild install qmerge", will the package recorded in my world ?

Thanks, and sorry if I'm not posted in the right category.

<string.h> in C is equivalent to <cstring> in C++. <string> is for std::string.

And regarding bug - it's already there ;) see https://bugs.gentoo.org/show_bug.cgi?id=213191
_________________
ncmpcpp - featureful ncurses based MPD client inspired by ncmpc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum