Compile on VS2005 Pro

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

Moderator: Moderators

Locked
bloodhound
Posts: 3
Joined: 2005-12-26 05:25
Location: Netherlands, Amersfoort

Compile on VS2005 Pro

Post by bloodhound » 2005-12-26 05:32

I am trying to compile the latest cvs version ith Visual Studio 2005 Pro. I get a lot of errors, please help.

Code: Select all

Compiling...
ADLSearchFrame.cpp
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C2143: syntax error : missing ',' before '*'
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C2146: syntax error : missing ')' before identifier 'u_int8_t'
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C2059: syntax error : ')'
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C2059: syntax error : ')'
d:\programmeren\cvs\dcplusplus\client\Text.h(98) : error C2143: syntax error : missing ';' before '{'
d:\programmeren\cvs\dcplusplus\client\Text.h(107) : error C2065: 'u_int8_t' : undeclared identifier
d:\programmeren\cvs\dcplusplus\client\Text.h(107) : error C2146: syntax error : missing ']' before identifier 'c'
d:\programmeren\cvs\dcplusplus\client\Text.h(109) : error C2065: 'u_int16_t' : undeclared identifier
d:\programmeren\cvs\dcplusplus\client\Text.h(109) : error C2146: syntax error : missing ']' before identifier 'c'
d:\programmeren\cvs\dcplusplus\client\Util.h(269) : error C2061: syntax error : identifier 'u_int16_t'
d:\programmeren\cvs\dcplusplus\client\Util.h(321) : error C2061: syntax error : identifier 'int64_t'
d:\programmeren\cvs\dcplusplus\client\Util.h(323) : error C2061: syntax error : identifier 'int64_t'
d:\programmeren\cvs\dcplusplus\client\Util.h(325) : error C2061: syntax error : identifier 'int64_t'
d:\programmeren\cvs\dcplusplus\client\Util.h(334) : error C2146: syntax error : missing ';' before identifier 'toInt64'
d:\programmeren\cvs\dcplusplus\client\Util.h(334) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\programmeren\cvs\dcplusplus\client\Util.h(334) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\programmeren\cvs\dcplusplus\client\Util.h(334) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\programmeren\cvs\dcplusplus\client\Util.h(340) : warning C4183: 'toInt64': missing return type; assumed to be a member function returning 'int'
d:\programmeren\cvs\dcplusplus\client\Util.h(345) : error C2146: syntax error : missing ';' before identifier 'toUInt32'
there are a lot more but you have to start from the top of course :). I am not really in to C++ yet, only trying to compile at the moment.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-12-26 06:15

Check the link I have provided in this thread: http://www.dcpp.net/forum/viewtopic.php?t=15571

bloodhound
Posts: 3
Joined: 2005-12-26 05:25
Location: Netherlands, Amersfoort

Post by bloodhound » 2005-12-26 06:46

sorry i am such a noob. i am searching the forum / internet on how to apply such a patch... but no result... so how do i do it?

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-12-26 10:16

That patch was made for an older CVS version of DC++ and shall not be applied automatically as much code has changed since then but the patch file is quite easy to understand and apply manually, just open it with your favourite text edito. If you are trying to compile the latest CVS code is it not very much that needs to be changed. On line 65 in config.h must

Code: Select all

# if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310
be changed to

Code: Select all

# if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310 || _MSC_VER == 1400
And in ExtendedTrace.cpp must

Code: Select all

Line 193: lpszParamSep = _tcschr( lpszParsed, _T(',') );
Line 205: lpszParamSep = _tcschr( lpszParsed, _T(')') );
be changed to

Code: Select all

Line 193: lpszParamSep = (LPTSTR)_tcschr( lpszParsed, _T(',') );
Line 205: lpszParamSep = (LPTSTR)_tcschr( lpszParsed, _T(')') );
And to not get extremly many warnings about deprecated functions I suggest that you put ;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE into preprocessor defines for all projects.
And for the DCPlusPlus project must Properties->Linker->Manifest File->Generate manifest be set to no.

Bu if you are trying to compile the source for the latest release version of DC++ is it much more that needs to be done.

bloodhound
Posts: 3
Joined: 2005-12-26 05:25
Location: Netherlands, Amersfoort

Post by bloodhound » 2005-12-26 11:19

Tnx very much, it's running :)

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-12-26 12:20

bloodhound wrote:Tnx very much, it's running :)
Good luck with it ;).

Locked