?
Solved

Compling log4cplus in vc 2005 express edition

Posted on 2006-05-05
6
Medium Priority
?
1,090 Views
Last Modified: 2007-12-19
Cannot compile log4cplus in vc 2005 express edition
I am getting these errors


1>------ Build started: Project: log4cplus_static, Configuration: Debug Win32 ------
1>Compiling...
1>timehelper.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
1>threads.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
1>stringhelper.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
1>socketbuffer.cxx
1>socketappender.cxx
1>socket.cxx
1>socket-win32.cxx
1>sleep.cxx
1>rootlogger.cxx
1>property.cxx
1>pointer.cxx
1>patternlayout.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
1>objectregistry.cxx
1>nullappender.cxx
1>nteventlogappender.cxx
1>ndc.cxx
1>logloguser.cxx
1>loglog.cxx
1>loglevel.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
1>loggingserver.cxx
1>Generating Code...
1>Compiling...
1>loggingevent.cxx
1>loggerimpl.cxx
1>logger.cxx
1>layout.cxx
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : error C3630: error when processing the token '__value'
1>        c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(132) : see reference to class template instantiation 'log4cplus::helpers::string_append_iterator<_Container>' being compiled
1>c:\log4cplus-1.0.2\include\log4cplus\helpers\stringhelper.h(125) : fatal error C1190: managed targeted code requires a '/clr' option
0
Comment
Question by:prgeorge3383
  • 3
  • 3
6 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 16618651
You have created a 'Managed C++' project, which will not be able to compile native C++ code, that's why the compiler chokes on that. Did you manaually create it or did you convert the .dsp project file?
0
 

Author Comment

by:prgeorge3383
ID: 16618762
I converted.....
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1500 total points
ID: 16618770
Any way to set that to 'Unmanaged' in the project settingd (i.e. by removing '/clr')?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:prgeorge3383
ID: 16618781
/Od /I "..\include" /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_LIB" /D "_WINDOWS" /D "LOG4CPLUS_STATIC" /D "_VC80_UPGRADE=0x0700" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Fp".\Debug/Static/log4cplus_static.pch" /Fo".\Debug/Static/" /Fd".\Debug/Static/" /FR".\Debug/Static\\" /W3 /nologo /c /ZI /errorReport:prompt

no clr options
0
 
LVL 86

Accepted Solution

by:
jkr earned 1500 total points
ID: 16618810
That's odd. Hm, what happens if you change '__value' to 'value' in stringhelper.h(125)? Or, to be more precise, to

            operator=(const typename _Container::value_type& value) {
                *container += value;
                return *this;
            }
0
 

Author Comment

by:prgeorge3383
ID: 16618848
COOL... could go furthur..... but still getting some errors
1>stringhelper.cxx
1>d:\program files\microsoft visual studio 8\vc\include\xutility(572) : error C2039: 'iterator_category' : is not a member of 'log4cplus::helpers::string_append_iterator<_Container>'
1>        with
1>        [
1>            _Container=log4cplus::tstring
1>        ]
1>        d:\program files\microsoft visual studio 8\vc\include\algorithm(685) : see reference to class template instantiation 'std::iterator_traits<_Iter>' being compiled
1>        with
1>        [
1>            _Iter=log4cplus::helpers::string_append_iterator<log4cplus::tstring>
1>        ]
1>        c:\log4cplus-1.0.2\src\stringhelper.cxx(118) : see reference to function template instantiation '_OutIt std::transform<std::_String_const_iterator<_Elem,_Traits,_Alloc>,log4cplus::helpers::string_append_iterator<_Container>,int(__cdecl *)(int)>(_InIt,_InIt,_OutIt,_Fn1)' being compiled
1>        with
1>        [
1>            _OutIt=log4cplus::helpers::string_append_iterator<log4cplus::tstring>,
1>            _Elem=char,
1>            _Traits=std::char_traits<char>,
1>            _Alloc=std::allocator<char>,
1>            _Container=log4cplus::tstring,
1>            _InIt=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,
1>            _Fn1=int (__cdecl *)(int)
1>        ]
1>d:\program files\microsoft visual studio 8\vc\include\xutility(572) : error C2146: syntax error : missing ';' before identifier 'iterator_category'
1>d:\program files\microsoft visual studio 8\vc\include\xutility(572) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files\microsoft visual studio 8\vc\include\xutility(572) : error C2602: 'std::iterator_traits<_Iter>::iterator_category' is not a member of a base class of '
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question