Author Topic: Compile fixes, STL Version, GCC 4.3.3  (Read 1252 times)

Offline tstrunk

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Compile fixes, STL Version, GCC 4.3.3
« on: May 07, 2009, 02:18:39 »
Hi everybody,

I downloaded Version 0x152 from codeproject (somebody should also link the newest version in this forum). I get compile errors on Ubuntu 9.04 with gcc 4.3.3:
http://pastebin.com/m6196fb1bhttp://pastebin.com/m2c846b44
and
xml.cpp:
http://pastebin.com/m47f9c0df

Best regards and thanks for the library,
Timo Strunk

Offline tstrunk

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Compile fixes, STL Version, GCC 4.3.3
« Reply #1 on: May 07, 2009, 02:51:30 »
And hi again,

-DXML_USE_NAMESPACE breaks everything again. There are a ton of error messages once it is used on GCC 4.3.3.
The error is quite hard to spot, but very easy to fix:
The problem is that first the namespace is opened and afterwards headers are included.
namespace XMLPP {
    #include <something>
}
This means that all the functions declared in something are also searched for in the namespace XMLPP.
I had to refactor the code a bit and move the includes in front of the namespace declaration. In this process I also replaced the deprecated C headers against their C++ counterparts.

The two diffs about the errors above and the errors in this message can be found here:
xml.cpp:
http://pastebin.com/m4edfd48e
xml.h:
http://pastebin.com/m2d3d5e92

Best regards,
Timo

Offline Michael

  • Administrator
  • Super Member
  • ******************
  • Posts: 1069
  • Karma: 32
    • TurboIRC.COM
Re: Compile fixes, STL Version, GCC 4.3.3
« Reply #2 on: May 07, 2009, 07:52:25 »
I will take a look -  btw the latest is 0x154.



Offline tstrunk

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Compile fixes, STL Version, GCC 4.3.3
« Reply #3 on: May 07, 2009, 09:04:23 »
Thanks a lot for the quick reply, I also saw now that the forum download is newer.

The diff files can't be applied directly then, but there should only be small offsets to merge the changes.

Offline steven444

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Compile fixes, STL Version, GCC 4.3.3
« Reply #4 on: March 19, 2010, 07:21:40 »
nice post dear
steven