bugpng++, a C++ wrapper for libpng - Bugs: bug #32198, Bugs in config.hpp and error.hpp...

 
 

bug #32198: Bugs in config.hpp and error.hpp (at least on windows)

Submitted by:  None
Submitted on:  Thu 20 Jan 2011 07:40:19 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Alexander Shulgin <alexshulgin>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 19 Aug 2012 06:14:14 AM UTC, comment #5:

That has been fixed, see: http://svn.savannah.nongnu.org/viewvc/trunk/config.hpp?revision=118&root=pngpp&view=markup

It's just that there was no release since then. You can always use version from trunk, if you want the latest fixes (and bugs, sigh.)

Alexander Shulgin <alexshulgin>
Project AdministratorIn charge of this item.
Sun 19 Aug 2012 02:33:06 AM UTC, comment #4:

Hi Alex,

Just wondered if config.hpp ever got updated. I started using 0.2.5 this morning and it still had 2 underscores.

Thanks,

Eric

Eric Vaughan <fingerflinger>
Mon 24 Jan 2011 09:09:42 AM UTC, comment #3:

Added #include <string> to error.hpp. This should fix that :)

Alexander Shulgin <alexshulgin>
Project AdministratorIn charge of this item.
Sun 23 Jan 2011 05:56:39 PM UTC, comment #2:

Hi,

> Hi, thanks for reporting!


You're welcome.

> 2) No, your compiler is broken. Can you send me the error message you get on that line?


I would like to, but as i reverted the change i made in your error.hpp and recompiled the code, the error message didn't come up this time. Who knows what went wrong back then ;)

Anyway you where right: there is a globally defined operator+ for string objects in the <string> header - i found that out just 10 minutes before i read your reply :D Guess one never stops learning new things in the world of C++. However, it would be nice to add an include statement in that error.hpp file, so that it's obvious that you require declarations from there.

Just for curiosity: my compiler is MSVC "16.00.30319.01 x64"

- Lars -

Anonymous
Fri 21 Jan 2011 08:53:21 AM UTC, comment #1:

Hi, thanks for reporting!

1) Yes, this is valid claim. Fixed in trunk.

2) No, your compiler is broken. Can you send me the error message you get on that line?

Note that `string operator+(string, char const*)' is defined outside the string class, i.e. it's a non-member function.

--
Alex

Alexander Shulgin <alexshulgin>
Project AdministratorIn charge of this item.
Thu 20 Jan 2011 07:40:19 PM UTC, original submission:

Hi,

i appreciate your effort in creating a C++ wrapper for libpng. I was planning to use it on a project of mine, that was supposed to be portable among various platforms. I for myself develop on Windows 7 64-bit. I herey discovered some errors:

1) config.hpp

on line 39 it should be _WIN32, not __WIN32, as the MSVC compiler uses the first version with only 1 underscore. I know that there are several version of this makro floating arround the net, but that's the one supported on windows, which eventually cares about this flag anyway.

After i fixed this i got another error in error.hpp (line 77):

There you try to concatenate strings in the constructors argument via some "+" operator. But there is no such operator defined for the standard class string. There is an operator += that could do what you want here (see: http://cplusplus.com/reference/string/string/operator+=/). I wonder how you could compile the code so far. I had to change line 77 to the following to get it compile:

: std::runtime_error((std::string(message) += ": ") += strerror(error))

I hope that helps a little.

Cheers,
Lars Kuehne

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fingerflinger (Posted a comment)
  • -unavailable- added by alexshulgin (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 24 Jan 2011 09:09:42 AM UTCalexshulginStatusNeed Info=>Fixed
      Assigned toNone=>alexshulgin
      Open/ClosedOpen=>Closed
    Fri 21 Jan 2011 08:53:21 AM UTCalexshulginStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1