Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2007

Tip: Looking for answers? Try searching our database.

VS2005 breaking my builds !

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bit Byte - 03 Mar 2007 19:35 GMT
I'm having problem compiling one of my projects with VS2005. The
problems arise with VS2005 (apparent?) inability to compile log4cpp.

Has anyone succesfully compiled log4cpp using VS2005?

Here are the errors I get:

Error    1    error C2039: 'iterator_category' : is not a member of
'log4cplus::helpers::string_append_iterator<_Container>'    c:\program
files\microsoft visual studio 8\vc\include\xutility    572   
Error    2    error C2146: syntax error : missing ';' before identifier
'iterator_category'    c:\program files\microsoft visual studio
8\vc\include\xutility    572   
Error    3    error C4430: missing type specifier - int assumed. Note: C++
does not support default-int    c:\program files\microsoft visual studio
8\vc\include\xutility    572   
Error    4    error C2602: 'std::iterator_traits<_Iter>::iterator_category' is
not a member of a base class of 'std::iterator_traits<_Iter>'    c:\program
files\microsoft visual studio 8\vc\include\xutility    572   
Error    5    error C2868: 'std::iterator_traits<_Iter>::iterator_category' :
illegal syntax for using-declaration; expected qualified-name    c:\program
files\microsoft visual studio 8\vc\include\xutility    572   

Ideas, suggestions and (most of all) fixes welcome ...
Carl Daniel [VC++ MVP] - 04 Mar 2007 03:30 GMT
> I'm having problem compiling one of my projects with VS2005. The
> problems arise with VS2005 (apparent?) inability to compile log4cpp.

What version of log4cpp are you using?  I tried grabbing the latest code
(v0.3.5) from sourceforge and found only a VC6 workspace that contains a
bunch of broken projects - it doesn't look like anyone's done any VC++
maintenance on this project for a couple years, and even then they were
using a year out of date version of VC++..

-cd
Bit Byte - 04 Mar 2007 06:09 GMT
>>I'm having problem compiling one of my projects with VS2005. The
>>problems arise with VS2005 (apparent?) inability to compile log4cpp.
[quoted text clipped - 6 lines]
>
> -cd

Hi Carl, I'm using v1.0.2 - please see http://log4cplus.sourceforge.net/
Yes, I agree dev has kinda halted on this (last fix was in '04) - but I
have a lot of other code using the log4cpp dll and it would be a
nightmare to strip it out and use another library ...

Cheers
Carl Daniel [VC++ MVP] - 04 Mar 2007 06:27 GMT
>>> I'm having problem compiling one of my projects with VS2005. The
>>> problems arise with VS2005 (apparent?) inability to compile log4cpp.
[quoted text clipped - 12 lines]
> the log4cpp dll and it would be a nightmare to strip it out and use
> another library ...

OK, that version is much closer to working.  I had to make 2 changes to get
it to compile with VC 2005:

replace all occurrences of __value with something else:  __value is
recognized as a keyword by the VC2005 compiler (the authors of log4cpp
should not have used it - all identifiers containing two consequetive
underscores are reserved to the implementation).

For the specific error you're seeing, insert the following line of code into
\include\log4cplus\helpers\stringhelper.h, line 123:

  typedef std::output_iterator_tag iterator_category;

I didn't try testing the library, but it builds with those two changes.

-cd
Bit Byte - 04 Mar 2007 06:37 GMT
>>>>I'm having problem compiling one of my projects with VS2005. The
>>>>problems arise with VS2005 (apparent?) inability to compile log4cpp.
[quoted text clipped - 29 lines]
>
> -cd

Thanks for the quick response Carl - I'll make the modifications now and
then test it later with my apps - I'll let you know how it goes.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.