0.25 compiling error

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
volume
Posts: 13
Joined: 2003-03-12 05:02

0.25 compiling error

Post by volume » 2003-05-21 12:24

--------------------Configuration: client - Win32 Release--------------------
Compiling...
ShareManager.cpp
C:\pippo\client\StringSearch.h(92) : warning C4244: 'initializing' : conversion from 'int' to 'unsigned short', possible loss of data
C:\pippo\client\StringSearch.h(101) : warning C4244: '=' : conversion from 'int' to 'unsigned short', possible loss of data
C:\pippo\client\ShareManager.cpp(582) : warning C4239: nonstandard extension used : 'argument' : conversion from 'struct _STL::auto_ptr<class _STL::vector<class StringSearch,class _STL::allocator<class StringSearch> > >' to 'struct _STL::auto_ptr<cl
ass _STL::vector<class StringSearch,class _STL::allocator<class StringSearch> > > &'
A reference that is not to 'const' cannot be bound to a non-lvalue
C:\pippo\client\ShareManager.cpp(670) : error C2040: 'i' : 'struct _STL::_Ht_iterator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class ShareManager::Directory *>,struct _STL::_N
onconst_traits<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class ShareManager::Directory *> >,class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<ch
ar> >,struct _STL::hash<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > >,struct _STL::_Select1st<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > c
onst ,class ShareManager::Directory *> >,struct _STL::equal_to<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > >,class _STL::allocator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<
char>,class _STL::allocator<char> > const ,class ShareManager::Directory *> > >' differs in levels of indirection from 'class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > *'
C:\pippo\client\ShareManager.cpp(670) : error C2679: binary '!=' : no operator defined which takes a right-hand operand of type 'struct _STL::_Ht_iterator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allo
cator<char> > const ,class ShareManager::Directory *>,struct _STL::_Nonconst_traits<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class ShareManager::Directory *> >,class _STL::bas
ic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> >,struct _STL::hash<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > >,struct _STL::_Select1st<struct _STL::pair<class _STL::basic_stri
ng<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class ShareManager::Directory *> >,struct _STL::equal_to<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > >,class _STL::allocator<str
uct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class ShareManager::Directory *> > >' (or there is no acceptable conversion)
C:\pippo\client\ShareManager.cpp(671) : error C2039: 'second' : is not a member of 'basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> >'
C:\pippo\client\ShareManager.cpp(671) : error C2227: left of '->search' must point to class/struct/union
Error executing cl.exe.

DCPlusPlus.exe - 4 error(s), 3 warning(s)


Win xp pro - Ms Visual 6

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-05-21 23:05

Have you successfully compiled previous versions of DC++?

Since you're using VS6, you might want to add StringSearch.h to your client project, since it's not there. It's only a .h file, so it shouldn't be necessary, however....

volume
Posts: 13
Joined: 2003-03-12 05:02

Post by volume » 2003-05-22 02:29

0.241 : OK

0.242
--------------------Configuration: DCPlusPlus - Win32 Debug--------------------
Linking...
ADLSearchFrame.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSProperties::OnCloseCmd(unsigned short,unsigned short,struct HWND__ *,int &)" (?OnCloseCmd@ADLSProperties@@QAEJGGPAUHWND__@@AAH@Z)
ADLSearchFrame.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSProperties::OnInitDialog(unsigned int,unsigned int,long,int &)" (?OnInitDialog@ADLSProperties@@QAEJIIJAAH@Z)
App/DCPlusPlus.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

0.25: other post


wtl and stl are OK in the include path and in correct order :( :( :(

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Post by Atomic Jo » 2003-05-22 02:43

For the 0.242 version problems, I think you must include manually ADLSProperties.cpp (.h) to your "client" project and ADLSearchFrame.cpp to the DCpluplus project if they aren't not here.

valloth
Posts: 3
Joined: 2003-05-23 13:03

Post by valloth » 2003-05-23 13:08

I had a similar problem. It is caused by changes in the files Sharemanager.cpp and ShareManager.h. I solved the problem by copying the old files of the .24 release into the .25 directory and now everything compiles as usual.

sarf
Posts: 382
Joined: 2003-01-24 05:43
Location: Sweden
Contact:

Post by sarf » 2003-05-24 01:18

valloth: you could've simply added "StringSearch.h" to your "client" project - it should have fixed your problem.

Sarf
---
It is easier to fight for one's principles than to live up to them.

massilori
Posts: 1
Joined: 2003-05-24 08:22

Post by massilori » 2003-05-24 08:26

sarf wrote:valloth: you could've simply added "StringSearch.h" to your "client" project - it should have fixed your problem.

Sarf
0.241, compiling easy way, no modified

0.242, 0.25 same errors of "volume".

Adding StringSearch.h into "client -> header" files haven't any effect.

sarf
Posts: 382
Joined: 2003-01-24 05:43
Location: Sweden
Contact:

Post by sarf » 2003-05-24 08:40

Strange... ah well. Visual Studio has a tendency to dislike DC++, for some reason (and arne is a bit absentminded sometimes).

Sarf
---
Today is a good day to bribe a high ranking public official.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-05-24 12:26

valloth wrote:I had a similar problem. It is caused by changes in the files Sharemanager.cpp and ShareManager.h. I solved the problem by copying the old files of the .24 release into the .25 directory and now everything compiles as usual.
:) Well, as long as you know what you're doing. It looks like you'll only be missing out on the new string search functions, but there might be something that a casual glance didn't turn up.

pindemad
Posts: 2
Joined: 2003-05-24 12:36

Post by pindemad » 2003-05-24 12:47

The problem in sharemanager.cpp is that the iterator i in line 670 is a redefinition. If you incapsulate lines 670 - 672 in additional brackets ({}) it should compile correctly.

valloth
Posts: 3
Joined: 2003-05-23 13:03

Redefinition of i

Post by valloth » 2003-05-25 09:05

pindemad wrote:The problem in sharemanager.cpp is that the iterator i in line 670 is a redefinition. If you incapsulate lines 670 - 672 in additional brackets ({}) it should compile correctly.
This solved the compilation error. Excellent solution! :D

Locked