List Info

Thread: Compilation Errors




Compilation Errors
user name
2008-04-12 21:01:51
I am just trying to run a really simple "Hello World"; type app for SvnCpp and am having issues when I compile my code. ; Essentially what I am doing is trying to just list the file contents of a remote file SVN repo. ; Compile on Ubuntu 8.04 using SvnCpp (0.9.4) [http://packages.ubuntu.com/hardy/libsvncpp-dev].

So I am running this code:

#include <iostream>

#include <context.hpp>
#include <client.hpp>
#include <revision.hpp>

using namespace std;
using namespace svn;

int main() {

 &nbsp;  Context* temp = new Context(&quot;/home/rlovelett/Desktop/TRACS/");
&nbsp;   Client* test = new Client(temp);

&nbsp; &nbsp; svn_opt_revision_t* rev;

&nbsp; &nbsp; rev->kind = Revision::HEAD;

&nbsp; &nbsp; DirEntries result = test->list("svn://SVN_REPO_ADDRESS_REMOVED/&quot;, rev, false);

&nbsp;   return 0;
}

The problem is that when I do compile I am getting crazy errors, where it is telling me that svn:irEntry is invalidly being used. ; This does not seem to make sense, as I'm not directly implementing svn:irEntry so I cannot be the one having the issue with svn:irEntry.

These are the output errors from Code::Blocks:

-------------- Build: Debug in SvnCPP ---------------

Compiling: main.cpp
/usr/include/c++/4.2/bits/stl_vector.h: In destructor 'std::_Vector_base<;_Tp, _Alloc>::~_Vector_base() [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]':
/usr/include/c++/4.2/bits/stl_vector.h:269: ;  instantiated from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:   instantiated from here
/usr/include/c++/4.2/bits/stl_vector.h:120: error: invalid use of incomplete type 'struct svn:irEntry'
/usr/include/svncpp/client.hpp:62: error: forward declaration of 'struct svn:irEntry'
/usr/include/c++/4.2/bits/stl_vector.h: In member function 'size_t std::vector<_Tp, _Alloc>::size() const [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]':
/usr/include/c++/4.2/bits/stl_vector.h:229: ;  instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_vector.h:397: error: invalid use of incomplete type 'struct svn:irEntry'
/usr/include/svncpp/client.hpp:62: error: forward declaration of 'struct svn:irEntry'
/usr/include/c++/4.2/bits/stl_vector.h: In constructor 'std::_Vector_base<;_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]':
/usr/include/c++/4.2/bits/stl_vector.h:229: &nbsp; instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_vector.h:116: error: invalid use of incomplete type 'struct svn:irEntry'
/usr/include/svncpp/client.hpp:62: error: forward declaration of 'struct svn:irEntry'
/usr/include/c++/4.2/bits/stl_construct.h: In function 'void std::__destroy_aux(_ForwardIterator, _ForwardIterator, std::__false_type) [with _ForwardIterator = svn:irEntry*]':
/usr/include/c++/4.2/bits/stl_construct.h:155: &nbsp; instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_construct.h:182:   instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>) [with _ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:268:&nbsp;  instantiated from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:121: error: cannot increment a pointer to incomplete type 'svn:irEntry'
/usr/include/c++/4.2/ext/new_allocator.h: In member function '_Tp* __gnu_cxx::new_allocator<_Tp&gt;::allocate(size_t, const void*) [with _Tp = svn:irEntry]':
/usr/include/c++/4.2/bits/stl_vector.h:128: &nbsp; instantiated from '_Tp* std::_Vector_base<_Tp, _Alloc>::_M_allocate(size_t) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:114: &nbsp; instantiated from 'std::_Vector_base<;_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/ext/new_allocator.h:91: error: invalid application of 'sizeof' to incomplete type 'svn:irEntry'
/usr/include/c++/4.2/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]':
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:&nbsp;  instantiated from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:&nbsp;  instantiated from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:230: &nbsp; instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_uninitialized.h:86: error: cannot increment a pointer to incomplete type 'svn:irEntry'
/usr/include/c++/4.2/bits/stl_construct.h: In function 'void std::_Destroy(_Tp*) [with _Tp = svn:irEntry]':
/usr/include/c++/4.2/bits/stl_construct.h:122:   instantiated from 'void std::__destroy_aux(_ForwardIterator, _ForwardIterator, std::__false_type) [with _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_construct.h:155: &nbsp; instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_construct.h:182:   instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>) [with _ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:268:&nbsp;  instantiated from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:107: error: invalid use of incomplete type 'struct svn:irEntry'
/usr/include/svncpp/client.hpp:62: error: forward declaration of 'struct svn:irEntry'
/usr/include/c++/4.2/ext/new_allocator.h: In member function 'size_t __gnu_cxx::new_allocator<_Tp&gt;::max_size() const [with _Tp = svn:irEntry]':
/usr/include/c++/4.2/ext/new_allocator.h:88: &nbsp; instantiated from '_Tp* __gnu_cxx::new_allocator<_Tp&gt;::allocate(size_t, const void*) [with _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:128: &nbsp; instantiated from '_Tp* std::_Vector_base<_Tp, _Alloc>::_M_allocate(size_t) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:114: &nbsp; instantiated from 'std::_Vector_base<;_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/ext/new_allocator.h:101: error: invalid application of 'sizeof' to incomplete type 'svn:irEntry'
/usr/include/c++/4.2/bits/stl_iterator.h: In member function '__gnu_cxx::__normal_iterator<;_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = const svn:irEntry*, _Container = std::vector<svn:irEntry, std::allocator<svn:irEntry>; >]':
/usr/include/c++/4.2/bits/stl_uninitialized.h:86:   instantiated from '_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:&nbsp;  instantiated from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:&nbsp;  instantiated from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:230: &nbsp; instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_iterator.h:675: error: cannot increment a pointer to incomplete type 'const svn:irEntry'
/usr/include/c++/4.2/bits/stl_construct.h: In function 'void std::_Construct(_T1*, const _T2&) [with _T1 = svn:irEntry, _T2 = svn:irEntry]':
/usr/include/c++/4.2/bits/stl_uninitialized.h:87:&nbsp;  instantiated from '_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:&nbsp;  instantiated from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*]'
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:&nbsp;  instantiated from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>) [with _InputIterator = __gnu_cxx::__normal_iterator<const svn:irEntry*, std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >, _ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]'
/usr/include/c++/4.2/bits/stl_vector.h:230: &nbsp; instantiated from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:&nbsp;  instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:81: error: invalid use of incomplete type 'struct svn:irEntry'
/usr/include/svncpp/client.hpp:62: error: forward declaration of 'struct svn:irEntry'
Process terminated with status 1 (0 minutes, 2 seconds)
15 errors, 0 warnings
&nbsp;
Hopefully this is just a depenency issue since no one else seems to be having this issue, so if anyone can point me in the right direction I'd be very appreciative.

Thanks,
Ryan

--

Ryan Lovelett
Ryan.Lovelettgmail.com">Ryan.Lovelettgmail.com
Re: Compilation Errors
user name
2008-04-13 12:23:52
Hi,

I tried to compile your code, and I found a reason why you
failed.
You should append:
#include <dirent.hpp>
to your code.

"client.hpp" does not have complete definition of
these classes:
  class Context;
  class DirEntry;
  class Info;
  class Status;
  class Target

#Why they are defined as forward declarations, I don't
know...

2008/4/13, Ryan Lovelett <ryan.lovelettgmail.com>:
> I am just trying to run a really simple "Hello
World" type app for SvnCpp
> and am having issues when I compile my code. 
Essentially what I am doing is
> trying to just list the file contents of a remote file
SVN repo.  Compile on
> Ubuntu 8.04 using SvnCpp (0.9.4)
> [http:/
/packages.ubuntu.com/hardy/libsvncpp-dev].
>
> So I am running this code:
>
> > #include <iostream>
> >
> > #include <context.hpp>
> > #include <client.hpp>
> > #include <revision.hpp>
> >
> > using namespace std;
> > using namespace svn;
> >
> > int main() {
> >
> >     Context* temp = new
> Context("/home/rlovelett/Desktop/TRACS/");
> >     Client* test = new Client(temp);
> >
> >     svn_opt_revision_t* rev;
> >
> >     rev->kind = Revision::HEAD;
> >
> >     DirEntries result =
>
test->list("svn://SVN_REPO_ADDRESS_REMOVED/",
rev, false);
> >
> >     return 0;
> > }
> >
>
>  The problem is that when I do compile I am getting
crazy errors, where it
> is telling me that svn:irEntry
is invalidly being used.  This does not
> seem to make sense, as I'm not directly implementing
svn:irEntry
so I
> cannot be the one having the issue with svn:irEntry.

>
> These are the output errors from Code::Blocks:
>
> -------------- Build: Debug in SvnCPP ---------------
>
> Compiling: main.cpp
> /usr/include/c++/4.2/bits/stl_vector.h: In destructor
> 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base()
[with _Tp = svn:irEntry,

> _Alloc = std::allocator<svn:irEntry&
gt;]':
>  /usr/include/c++/4.2/bits/stl_vector.h:269:  
instantiated
> from 'std::vector<_Tp, _Alloc>::~vector() [with
_Tp = svn:irEntry,
_Alloc
> = std::allocator<svn:irEntry&
gt;]'
> /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
>  /usr/include/c++/4.2/bits/stl_vector.h:120: error:
invalid
> use of incomplete type 'struct svn:irEntry'

> /usr/include/svncpp/client.hpp:62: error: forward
> declaration of 'struct svn:irEntry'

> /usr/include/c++/4.2/bits/stl_vector.h: In member
function
> 'size_t std::vector<_Tp, _Alloc>::size() const
[with _Tp = svn:irEntry,

> _Alloc = std::allocator<svn:irEntry&
gt;]':
>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_vector.h:397: error:
invalid
> use of incomplete type 'struct svn:irEntry'

> /usr/include/svncpp/client.hpp:62: error: forward
> declaration of 'struct svn:irEntry'

>  /usr/include/c++/4.2/bits/stl_vector.h: In
constructor
> 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&) [with
> _Tp = svn:irEntry,
_Alloc =
> std::allocator<svn:irEntry&
gt;]':
> /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_vector.h:116: error:
invalid
> use of incomplete type 'struct svn:irEntry'

> /usr/include/svncpp/client.hpp:62: error: forward
> declaration of 'struct svn:irEntry'

>  /usr/include/c++/4.2/bits/stl_construct.h: In
function
> 'void std::__destroy_aux(_ForwardIterator,
> _ForwardIterator, std::__false_type) [with
_ForwardIterator =
> svn:irEntry*
]':
> /usr/include/c++/4.2/bits/stl_construct.h:155:
> instantiated from 'void std::_Destroy(_ForwardIterator,
_ForwardIterator)
> [with _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_construct.h:182:
> instantiated from 'void std::_Destroy(_ForwardIterator,
_ForwardIterator,
> std::allocator<_T2>) [with _ForwardIterator =
svn:irEntry*
, _Tp =
> svn:irEntry]
'
> /usr/include/c++/4.2/bits/stl_vector.h:268:  
instantiated
> from 'std::vector<_Tp, _Alloc>::~vector() [with
_Tp = svn:irEntry,
_Alloc
> = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_construct.h:121: error:
> cannot increment a pointer to incomplete type 'svn:irEntry'

> /usr/include/c++/4.2/ext/new_allocator.h: In member
> function '_Tp*
> __gnu_cxx::new_allocator<_Tp>::allocate(size_t,
const
> void*) [with _Tp = svn:irEntry]
':
>  /usr/include/c++/4.2/bits/stl_vector.h:128:  
instantiated
> from '_Tp* std::_Vector_base<_Tp,
_Alloc>::_M_allocate(size_t) [with _Tp =
> svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
> /usr/include/c++/4.2/bits/stl_vector.h:114:  
instantiated
> from 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/ext/new_allocator.h:91: error:
invalid
> application of 'sizeof' to incomplete type 'svn:irEntry'

> /usr/include/c++/4.2/bits/stl_uninitialized.h: In
function
> '_ForwardIterator
> std::__uninitialized_copy_aux(_InputIterator,
> _InputIterator, _ForwardIterator, std::__false_type)
[with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]':
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:114:
> instantiated from '_ForwardIterator
> std::uninitialized_copy(_InputIterator,
_InputIterator,
> _ForwardIterator) [with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:254:
> instantiated from '_ForwardIterator
> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_uninitialized.h:86:
error:
> cannot increment a pointer to incomplete type 'svn:irEntry'

> /usr/include/c++/4.2/bits/stl_construct.h: In function
> 'void std::_Destroy(_Tp*) [with _Tp = svn:irEntry]
':
>  /usr/include/c++/4.2/bits/stl_construct.h:122:
> instantiated from 'void
> std::__destroy_aux(_ForwardIterator, _ForwardIterator,
> std::__false_type) [with _ForwardIterator = svn:irEntry*
]'
> /usr/include/c++/4.2/bits/stl_construct.h:155:
> instantiated from 'void std::_Destroy(_ForwardIterator,
_ForwardIterator)
> [with _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_construct.h:182:
> instantiated from 'void std::_Destroy(_ForwardIterator,
_ForwardIterator,
> std::allocator<_T2>) [with _ForwardIterator =
svn:irEntry*
, _Tp =
> svn:irEntry]
'
> /usr/include/c++/4.2/bits/stl_vector.h:268:  
instantiated
> from 'std::vector<_Tp, _Alloc>::~vector() [with
_Tp = svn:irEntry,
_Alloc
> = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_construct.h:107: error:
> invalid use of incomplete type 'struct svn:irEntry'

> /usr/include/svncpp/client.hpp:62: error: forward
> declaration of 'struct svn:irEntry'

>  /usr/include/c++/4.2/ext/new_allocator.h: In member
> function 'size_t
__gnu_cxx::new_allocator<_Tp>::max_size()
> const [with _Tp = svn:irEntry]
':
> /usr/include/c++/4.2/ext/new_allocator.h:88:  
instantiated
> from '_Tp*
__gnu_cxx::new_allocator<_Tp>::allocate(size_t,
> const void*) [with _Tp = svn:irEntry]
'
>  /usr/include/c++/4.2/bits/stl_vector.h:128:  
instantiated
> from '_Tp* std::_Vector_base<_Tp,
_Alloc>::_M_allocate(size_t) [with _Tp =
> svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
> /usr/include/c++/4.2/bits/stl_vector.h:114:  
instantiated
> from 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/ext/new_allocator.h:101: error:
> invalid application of 'sizeof' to incomplete type
'svn:irEntry'

> /usr/include/c++/4.2/bits/stl_iterator.h: In member
> function '__gnu_cxx::__normal_iterator<_Iterator,
> _Container>&
__gnu_cxx::__normal_iterator<_Iterator,
> _Container>::operator++() [with _Iterator = const
svn:irEntry*
, _Container
> = std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; >]':
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:86:
> instantiated from '_ForwardIterator
> std::__uninitialized_copy_aux(_InputIterator,
> _InputIterator, _ForwardIterator, std::__false_type)
[with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:114:
> instantiated from '_ForwardIterator
> std::uninitialized_copy(_InputIterator,
_InputIterator,
> _ForwardIterator) [with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:254:
> instantiated from '_ForwardIterator
> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_iterator.h:675: error:
cannot
> increment a pointer to incomplete type 'const svn:irEntry'

> /usr/include/c++/4.2/bits/stl_construct.h: In function
> 'void std::_Construct(_T1*, const _T2&) [with _T1 =
svn:irEntry,
_T2 =
> svn:irEntry]
':
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:87:
> instantiated from '_ForwardIterator
> std::__uninitialized_copy_aux(_InputIterator,
> _InputIterator, _ForwardIterator, std::__false_type)
[with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:114:
> instantiated from '_ForwardIterator
> std::uninitialized_copy(_InputIterator,
_InputIterator,
> _ForwardIterator) [with _InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
]'
>  /usr/include/c++/4.2/bits/stl_uninitialized.h:254:
> instantiated from '_ForwardIterator
> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
> instantiated from here
> /usr/include/c++/4.2/bits/stl_construct.h:81: error:
> invalid use of incomplete type 'struct svn:irEntry'

> /usr/include/svncpp/client.hpp:62: error: forward
> declaration of 'struct svn:irEntry'

>  Process terminated with status 1 (0 minutes, 2
seconds)
> 15 errors, 0 warnings
>
> Hopefully this is just a depenency issue since no one
else seems to be
> having this issue, so if anyone can point me in the
right direction I'd be
> very appreciative.
>
> Thanks,
> Ryan
>
> --
>
> Ryan Lovelett
> Ryan.Lovelettgmail.com


-- 
Hisateru Tanaka

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscriberapidsvn.tigris.org
For additional commands, e-mail: dev-helprapidsvn.tigris.org


Re: Compilation Errors
user name
2008-04-13 16:12:06
Well, they are defined in dirent.hpp, context.hpp, info,hpp,
context.hpp...

They are defined here as forward declarations to remove
unnecessarry 
dependencies that are not needed in all cases. Otherwise, if
we did not 
use forward declarations if one inludes <client.hpp>
it would pull 
almost all of the other header feels whethere needed or
not.

You can read about it here:
http://www.ubookcase.co
m/book/Addison.Wesley/Effective.C.Plus.Plus.55.Specific.Ways
.to.Improve.Your.Programs.and.Designs/0321334876/ch05lev1sec
6.html
(probably the line is being truncated so one has to
concatenate the url)

Alex


Hisateru Tanaka schrieb:
> Hi,
> 
> I tried to compile your code, and I found a reason why
you failed.
> You should append:
> #include <dirent.hpp>
> to your code.
> 
> "client.hpp" does not have complete
definition of these classes:
>   class Context;
>   class DirEntry;
>   class Info;
>   class Status;
>   class Target
> 
> #Why they are defined as forward declarations, I don't
know...
> 
> 2008/4/13, Ryan Lovelett <ryan.lovelettgmail.com>:
>> I am just trying to run a really simple "Hello
World" type app for SvnCpp
>> and am having issues when I compile my code. 
Essentially what I am doing is
>> trying to just list the file contents of a remote
file SVN repo.  Compile on
>> Ubuntu 8.04 using SvnCpp (0.9.4)
>> [http:/
/packages.ubuntu.com/hardy/libsvncpp-dev].
>>
>> So I am running this code:
>>
>>> #include <iostream>
>>>
>>> #include <context.hpp>
>>> #include <client.hpp>
>>> #include <revision.hpp>
>>>
>>> using namespace std;
>>> using namespace svn;
>>>
>>> int main() {
>>>
>>>     Context* temp = new
>>
Context("/home/rlovelett/Desktop/TRACS/");
>>>     Client* test = new Client(temp);
>>>
>>>     svn_opt_revision_t* rev;
>>>
>>>     rev->kind = Revision::HEAD;
>>>
>>>     DirEntries result =
>>
test->list("svn://SVN_REPO_ADDRESS_REMOVED/",
rev, false);
>>>     return 0;
>>> }
>>>
>>  The problem is that when I do compile I am getting
crazy errors, where it
>> is telling me that svn:irEntry
is invalidly being used.  This does not
>> seem to make sense, as I'm not directly
implementing svn:irEntry
so I
>> cannot be the one having the issue with svn:irEntry.

>>
>> These are the output errors from Code::Blocks:
>>
>> -------------- Build: Debug in SvnCPP
---------------
>>
>> Compiling: main.cpp
>> /usr/include/c++/4.2/bits/stl_vector.h: In
destructor
>> 'std::_Vector_base<_Tp,
_Alloc>::~_Vector_base() [with _Tp = svn:irEntry,

>> _Alloc = std::allocator<svn:irEntry&
gt;]':
>>  /usr/include/c++/4.2/bits/stl_vector.h:269:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::~vector()
[with _Tp = svn:irEntry,
_Alloc
>> = std::allocator<svn:irEntry&
gt;]'
>> /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>>  /usr/include/c++/4.2/bits/stl_vector.h:120: error:
invalid
>> use of incomplete type 'struct svn:irEntry'

>> /usr/include/svncpp/client.hpp:62: error: forward
>> declaration of 'struct svn:irEntry'

>> /usr/include/c++/4.2/bits/stl_vector.h: In member
function
>> 'size_t std::vector<_Tp, _Alloc>::size()
const [with _Tp = svn:irEntry,

>> _Alloc = std::allocator<svn:irEntry&
gt;]':
>>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_vector.h:397: error:
invalid
>> use of incomplete type 'struct svn:irEntry'

>> /usr/include/svncpp/client.hpp:62: error: forward
>> declaration of 'struct svn:irEntry'

>>  /usr/include/c++/4.2/bits/stl_vector.h: In
constructor
>> 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&) [with
>> _Tp = svn:irEntry,
_Alloc =
>> std::allocator<svn:irEntry&
gt;]':
>> /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_vector.h:116: error:
invalid
>> use of incomplete type 'struct svn:irEntry'

>> /usr/include/svncpp/client.hpp:62: error: forward
>> declaration of 'struct svn:irEntry'

>>  /usr/include/c++/4.2/bits/stl_construct.h: In
function
>> 'void std::__destroy_aux(_ForwardIterator,
>> _ForwardIterator, std::__false_type) [with
_ForwardIterator =
>> svn:irEntry*
]':
>> /usr/include/c++/4.2/bits/stl_construct.h:155:
>> instantiated from 'void
std::_Destroy(_ForwardIterator, _ForwardIterator)
>> [with _ForwardIterator = svn:irEntry*
]'
>>  /usr/include/c++/4.2/bits/stl_construct.h:182:
>> instantiated from 'void
std::_Destroy(_ForwardIterator, _ForwardIterator,
>> std::allocator<_T2>) [with _ForwardIterator =
svn:irEntry*
, _Tp =
>> svn:irEntry]
'
>> /usr/include/c++/4.2/bits/stl_vector.h:268:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::~vector()
[with _Tp = svn:irEntry,
_Alloc
>> = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_construct.h:121:
error:
>> cannot increment a pointer to incomplete type
'svn:irEntry'

>> /usr/include/c++/4.2/ext/new_allocator.h: In
member
>> function '_Tp*
>>
__gnu_cxx::new_allocator<_Tp>::allocate(size_t, const
>> void*) [with _Tp = svn:irEntry]
':
>>  /usr/include/c++/4.2/bits/stl_vector.h:128:  
instantiated
>> from '_Tp* std::_Vector_base<_Tp,
_Alloc>::_M_allocate(size_t) [with _Tp =
>> svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>> /usr/include/c++/4.2/bits/stl_vector.h:114:  
instantiated
>> from 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/ext/new_allocator.h:91: error:
invalid
>> application of 'sizeof' to incomplete type
'svn:irEntry'

>> /usr/include/c++/4.2/bits/stl_uninitialized.h: In
function
>> '_ForwardIterator
>> std::__uninitialized_copy_aux(_InputIterator,
>> _InputIterator, _ForwardIterator,
std::__false_type) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]':
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
>> instantiated from '_ForwardIterator
>> std::uninitialized_copy(_InputIterator,
_InputIterator,
>> _ForwardIterator) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]'
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
>> instantiated from '_ForwardIterator
>> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
>> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_uninitialized.h:86:
error:
>> cannot increment a pointer to incomplete type
'svn:irEntry'

>> /usr/include/c++/4.2/bits/stl_construct.h: In
function
>> 'void std::_Destroy(_Tp*) [with _Tp = svn:irEntry]
':
>>  /usr/include/c++/4.2/bits/stl_construct.h:122:
>> instantiated from 'void
>> std::__destroy_aux(_ForwardIterator,
_ForwardIterator,
>> std::__false_type) [with _ForwardIterator =
svn:irEntry*
]'
>> /usr/include/c++/4.2/bits/stl_construct.h:155:
>> instantiated from 'void
std::_Destroy(_ForwardIterator, _ForwardIterator)
>> [with _ForwardIterator = svn:irEntry*
]'
>>  /usr/include/c++/4.2/bits/stl_construct.h:182:
>> instantiated from 'void
std::_Destroy(_ForwardIterator, _ForwardIterator,
>> std::allocator<_T2>) [with _ForwardIterator =
svn:irEntry*
, _Tp =
>> svn:irEntry]
'
>> /usr/include/c++/4.2/bits/stl_vector.h:268:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::~vector()
[with _Tp = svn:irEntry,
_Alloc
>> = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_construct.h:107:
error:
>> invalid use of incomplete type 'struct svn:irEntry'

>> /usr/include/svncpp/client.hpp:62: error: forward
>> declaration of 'struct svn:irEntry'

>>  /usr/include/c++/4.2/ext/new_allocator.h: In
member
>> function 'size_t
__gnu_cxx::new_allocator<_Tp>::max_size()
>> const [with _Tp = svn:irEntry]
':
>> /usr/include/c++/4.2/ext/new_allocator.h:88:  
instantiated
>> from '_Tp*
__gnu_cxx::new_allocator<_Tp>::allocate(size_t,
>> const void*) [with _Tp = svn:irEntry]
'
>>  /usr/include/c++/4.2/bits/stl_vector.h:128:  
instantiated
>> from '_Tp* std::_Vector_base<_Tp,
_Alloc>::_M_allocate(size_t) [with _Tp =
>> svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>> /usr/include/c++/4.2/bits/stl_vector.h:114:  
instantiated
>> from 'std::_Vector_base<_Tp,
_Alloc>::_Vector_base(size_t, const _Alloc&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /usr/include/c++/4.2/bits/stl_vector.h:229:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/ext/new_allocator.h:101:
error:
>> invalid application of 'sizeof' to incomplete type
'svn:irEntry'

>> /usr/include/c++/4.2/bits/stl_iterator.h: In
member
>> function
'__gnu_cxx::__normal_iterator<_Iterator,
>> _Container>&
__gnu_cxx::__normal_iterator<_Iterator,
>> _Container>::operator++() [with _Iterator =
const svn:irEntry*
, _Container
>> = std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; >]':
>>  /usr/include/c++/4.2/bits/stl_uninitialized.h:86:
>> instantiated from '_ForwardIterator
>> std::__uninitialized_copy_aux(_InputIterator,
>> _InputIterator, _ForwardIterator,
std::__false_type) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]'
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
>> instantiated from '_ForwardIterator
>> std::uninitialized_copy(_InputIterator,
_InputIterator,
>> _ForwardIterator) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]'
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
>> instantiated from '_ForwardIterator
>> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
>> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_iterator.h:675:
error: cannot
>> increment a pointer to incomplete type 'const
svn:irEntry'

>> /usr/include/c++/4.2/bits/stl_construct.h: In
function
>> 'void std::_Construct(_T1*, const _T2&) [with
_T1 = svn:irEntry,
_T2 =
>> svn:irEntry]
':
>>  /usr/include/c++/4.2/bits/stl_uninitialized.h:87:
>> instantiated from '_ForwardIterator
>> std::__uninitialized_copy_aux(_InputIterator,
>> _InputIterator, _ForwardIterator,
std::__false_type) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]'
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
>> instantiated from '_ForwardIterator
>> std::uninitialized_copy(_InputIterator,
_InputIterator,
>> _ForwardIterator) [with _InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
]'
>> 
/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
>> instantiated from '_ForwardIterator
>> std::__uninitialized_copy_a(_InputIterator,
_InputIterator,
>> _ForwardIterator, std::allocator<_Tp>) [with
_InputIterator =
>> __gnu_cxx::__normal_iterator<const svn:irEntry*
,
>> std::vector<svn:irEntry,
std::allocator<svn:irEntry&
gt; > >,
>> _ForwardIterator = svn:irEntry*
, _Tp = svn:irEntry]
'
>>  /usr/include/c++/4.2/bits/stl_vector.h:230:  
instantiated
>> from 'std::vector<_Tp, _Alloc>::vector(const
std::vector<_Tp, _Alloc>&)
>> [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry&
gt;]'
>>  /home/rlovelett/Documents/SvnCPP/main.cpp:19:
>> instantiated from here
>> /usr/include/c++/4.2/bits/stl_construct.h:81:
error:
>> invalid use of incomplete type 'struct svn:irEntry'

>> /usr/include/svncpp/client.hpp:62: error: forward
>> declaration of 'struct svn:irEntry'

>>  Process terminated with status 1 (0 minutes, 2
seconds)
>> 15 errors, 0 warnings
>>
>> Hopefully this is just a depenency issue since no
one else seems to be
>> having this issue, so if anyone can point me in the
right direction I'd be
>> very appreciative.
>>
>> Thanks,
>> Ryan
>>
>> --
>>
>> Ryan Lovelett
>> Ryan.Lovelettgmail.com
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscriberapidsvn.tigris.org
For additional commands, e-mail: dev-helprapidsvn.tigris.org


Re: Compilation Errors
user name
2008-04-15 17:59:18
In the end I've basically given up on this. ; I've tried your compilation stuff, and it fixed those errors, and now I have new errors and no real explanation of what they are.  So, basically I'm going to give up on this SVN thing for right now.  Thanks, for the help.

On Sun, Apr 13, 2008 at 5:12 PM, Alexander Mueller < XelaRellumweb.de">XelaRellumweb.de>; wrote:
Well, they are defined in dirent.hpp, context.hpp, info,hpp, context.hpp...

They are defined here as forward declarations to remove unnecessarry dependencies that are not needed in all cases. Otherwise, if we did not use forward declarations if one inludes <client.hpp> it would pull almost all of the other header feels whethere needed or not.

You can read about it here:
http://www.ubookcase.com/book/Addison.Wesley/Effective.C.Plus.Plus.55.Specific.Ways.to.Improve.Your.Programs.and.Designs/0321334876/ch05lev1sec6.html
(probably the line is being truncated so one has to concatenate the url)

Alex


Hisateru Tanaka schrieb:

Hi,

I tried to compile your code, and I found a reason why you failed.
You should append:
#include <dirent.hpp>
to your code.

"client.hpp"; does not have complete definition of these classes:
 class Context;
 class DirEntry;
 class Info;
 class Status;
 class Target

#Why they are defined as forward declarations, I don't know...

2008/4/13, Ryan Lovelett < ryan.lovelettgmail.com" target="_blank">ryan.lovelettgmail.com>:
I am just trying to run a really simple "Hello World"; type app for SvnCpp
and am having issues when I compile my code.  Essentially what I am doing is
trying to just list the file contents of a remote file SVN repo.  Compile on
Ubuntu 8.04 using SvnCpp (0.9.4)
[http://packages.ubuntu.com/hardy/libsvncpp-dev].

So I am running this code:

#include <iostream>

#include <context.hpp>
#include <client.hpp>
#include <revision.hpp>

using namespace std;
using namespace svn;

int main() {

   Context* temp = new
Context(&quot;/home/rlovelett/Desktop/TRACS/&quot;);
   Client* test = new Client(temp);

   svn_opt_revision_t* rev;

   rev->kind = Revision::HEAD;

   DirEntries result =
test->list("svn://SVN_REPO_ADDRESS_REMOVED/", rev, false);
   return 0;
}

 The problem is that when I do compile I am getting crazy errors, where it
is telling me that svn:irEntry is invalidly being used.  This does not
seem to make sense, as I'm not directly implementing svn:irEntry so I
cannot be the one having the issue with svn:irEntry.

These are the output errors from Code::Blocks:

-------------- Build: Debug in SvnCPP ---------------

Compiling: main.cpp
/usr/include/c++/4.2/bits/stl_vector.h: In destructor
'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry>;]':
 /usr/include/c++/4.2/bits/stl_vector.h:269:   instantiated
from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc
= std::allocator<svn:irEntry>;]'
/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
&nbsp;/usr/include/c++/4.2/bits/stl_vector.h:120: error: invalid
use of incomplete type 'struct svn:irEntry9;
/usr/include/svncpp/client.hpp:62: error: forward
declaration of 'struct svn:irEntry9;
/usr/include/c++/4.2/bits/stl_vector.h: In member function
'size_t std::vector<_Tp, _Alloc>::size() const [with _Tp = svn:irEntry,
_Alloc = std::allocator<svn:irEntry>;]':
 /usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_vector.h:397: error: invalid
use of incomplete type 'struct svn:irEntry9;
/usr/include/svncpp/client.hpp:62: error: forward
declaration of 'struct svn:irEntry9;
 /usr/include/c++/4.2/bits/stl_vector.h: In constructor
'std::_Vector_base<_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;) [with
_Tp = svn:irEntry, _Alloc =
std::allocator<;svn:irEntry>;]':
/usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_vector.h:116: error: invalid
use of incomplete type 'struct svn:irEntry9;
/usr/include/svncpp/client.hpp:62: error: forward
declaration of 'struct svn:irEntry9;
 /usr/include/c++/4.2/bits/stl_construct.h: In function
'void std::__destroy_aux(_ForwardIterator,
_ForwardIterator, std::__false_type) [with _ForwardIterator =
svn:irEntry*]&#39;:
/usr/include/c++/4.2/bits/stl_construct.h:155:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator)
[with _ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_construct.h:182:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator,
std::allocator<_T2&gt;) [with _ForwardIterator = svn:irEntry*, _Tp =
svn:irEntry]&#39;
/usr/include/c++/4.2/bits/stl_vector.h:268:   instantiated
from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc
= std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:121: error:
cannot increment a pointer to incomplete type 'svn:irEntry9;
/usr/include/c++/4.2/ext/new_allocator.h: In member
function '_Tp*
__gnu_cxx::new_allocator<_Tp>::allocate(size_t, const
void*) [with _Tp = svn:irEntry]&#39;:
&nbsp;/usr/include/c++/4.2/bits/stl_vector.h:128:   instantiated
from '_Tp* std::_Vector_base<_Tp, _Alloc>::_M_allocate(size_t) [with _Tp =
svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:114:   instantiated
from 'std::_Vector_base<_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/ext/new_allocator.h:91: error: invalid
application of 'sizeof' to incomplete type 'svn:irEntry9;
/usr/include/c++/4.2/bits/stl_uninitialized.h: In function
'_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator,
_InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;:
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
instantiated from '_ForwardIterator
std::uninitialized_copy(_InputIterator, _InputIterator,
_ForwardIterator) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
instantiated from '_ForwardIterator
std::__uninitialized_copy_a(_InputIterator, _InputIterator,
_ForwardIterator, std::allocator<_Tp>) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]&#39;
 ;/usr/include/c++/4.2/bits/stl_vector.h:230:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_uninitialized.h:86: error:
cannot increment a pointer to incomplete type 'svn:irEntry9;
/usr/include/c++/4.2/bits/stl_construct.h: In function
'void std::_Destroy(_Tp*) [with _Tp = svn:irEntry]&#39;:
&nbsp;/usr/include/c++/4.2/bits/stl_construct.h:122:
instantiated from 'void
std::__destroy_aux(_ForwardIterator, _ForwardIterator,
std::__false_type) [with _ForwardIterator = svn:irEntry*]&#39;
/usr/include/c++/4.2/bits/stl_construct.h:155:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator)
[with _ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_construct.h:182:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator,
std::allocator<_T2&gt;) [with _ForwardIterator = svn:irEntry*, _Tp =
svn:irEntry]&#39;
/usr/include/c++/4.2/bits/stl_vector.h:268:   instantiated
from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = svn:irEntry, _Alloc
= std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:107: error:
invalid use of incomplete type 'struct svn:irEntry9;
/usr/include/svncpp/client.hpp:62: error: forward
declaration of 'struct svn:irEntry9;
 /usr/include/c++/4.2/ext/new_allocator.h: In member
function 'size_t __gnu_cxx::new_allocator<_Tp&gt;::max_size()
const [with _Tp = svn:irEntry]&#39;:
/usr/include/c++/4.2/ext/new_allocator.h:88:   instantiated
from '_Tp* __gnu_cxx::new_allocator<_Tp&gt;::allocate(size_t,
const void*) [with _Tp = svn:irEntry]&#39;
 ;/usr/include/c++/4.2/bits/stl_vector.h:128:   instantiated
from '_Tp* std::_Vector_base<_Tp, _Alloc>::_M_allocate(size_t) [with _Tp =
svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
/usr/include/c++/4.2/bits/stl_vector.h:114:   instantiated
from 'std::_Vector_base<_Tp, _Alloc>::_Vector_base(size_t, const _Alloc&;)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/usr/include/c++/4.2/bits/stl_vector.h:229:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/ext/new_allocator.h:101: error:
invalid application of 'sizeof' to incomplete type 'svn:irEntry9;
/usr/include/c++/4.2/bits/stl_iterator.h: In member
function '__gnu_cxx::__normal_iterator<_Iterator,
_Container>&amp; __gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator++() [with _Iterator = const svn:irEntry*, _Container
= std::vector<svn:irEntry, std::allocator<svn:irEntry>; >]':
 /usr/include/c++/4.2/bits/stl_uninitialized.h:86:
instantiated from '_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator,
_InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
instantiated from '_ForwardIterator
std::uninitialized_copy(_InputIterator, _InputIterator,
_ForwardIterator) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
instantiated from '_ForwardIterator
std::__uninitialized_copy_a(_InputIterator, _InputIterator,
_ForwardIterator, std::allocator<_Tp>) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]&#39;
 ;/usr/include/c++/4.2/bits/stl_vector.h:230:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_iterator.h:675: error: cannot
increment a pointer to incomplete type 'const svn:irEntry9;
/usr/include/c++/4.2/bits/stl_construct.h: In function
'void std::_Construct(_T1*, const _T2&) [with _T1 = svn:irEntry, _T2 =
svn:irEntry]&#39;:
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:87:
instantiated from '_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator,
_InputIterator, _ForwardIterator, std::__false_type) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:114:
instantiated from '_ForwardIterator
std::uninitialized_copy(_InputIterator, _InputIterator,
_ForwardIterator) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*]&#39;
&nbsp;/usr/include/c++/4.2/bits/stl_uninitialized.h:254:
instantiated from '_ForwardIterator
std::__uninitialized_copy_a(_InputIterator, _InputIterator,
_ForwardIterator, std::allocator<_Tp>) [with _InputIterator =
__gnu_cxx::__normal_iterator<const svn:irEntry*,
std::vector<svn:irEntry, std::allocator<svn:irEntry>; > >,
_ForwardIterator = svn:irEntry*, _Tp = svn:irEntry]&#39;
 ;/usr/include/c++/4.2/bits/stl_vector.h:230:   instantiated
from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&)
[with _Tp = svn:irEntry, _Alloc = std::allocator<svn:irEntry>;]'
&nbsp;/home/rlovelett/Documents/SvnCPP/main.cpp:19:
instantiated from here
/usr/include/c++/4.2/bits/stl_construct.h:81: error:
invalid use of incomplete type 'struct svn:irEntry9;
/usr/include/svncpp/client.hpp:62: error: forward
declaration of 'struct svn:irEntry9;
 Process terminated with status 1 (0 minutes, 2 seconds)
15 errors, 0 warnings

Hopefully this is just a depenency issue since no one else seems to be
having this issue, so if anyone can point me in the right direction I'd be
very appreciative.

Thanks,
Ryan

--

Ryan Lovelett
Ryan.Lovelettgmail.com" target="_blank">Ryan.Lovelettgmail.com



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscriberapidsvn.tigris.org" target="_blank">dev-unsubscriberapidsvn.tigris.org
For additional commands, e-mail: dev-helprapidsvn.tigris.org" target="_blank">dev-helprapidsvn.tigris.org




--

Ryan Lovelett
Ryan.Lovelettgmail.com">Ryan.Lovelettgmail.com
(352) 286-8637
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )