Silly story about one man trying to build Shareaza

Post comments about Shareaza code and discuss with other developers.
Forum rules
Home | Wiki | Rules

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 22 Oct 2010 22:06

kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 22:08

Look at "C:\Program Files\Microsoft SDKs\Windows\"
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 22 Oct 2010 22:14

kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 23 Oct 2010 04:43

Okay, I've gotten past all the _external_ things that were trying to keep me from building Shareaza. There were a lot of minor compilation problems that I fixed too, but now I'm stuck with the following piece of code in "hashlib\utility.hpp":

//! \brief generic function to swap the byte ordering of a given type
//!
//! The byte ordering can be swapped meaningfully only for unsigned integer types
//! therefore specializations are provided only for those types. We use
//! template specialization in order to avoid automatic argument conversion.
template<typename T>
struct SwapEndianess {};

template<> struct SwapEndianess< uint8 >
{
uint8 operator()(uint8 value) const { return value; }
};
template<> struct SwapEndianess< uint16 >
{
uint16 operator()(uint16 value) const
{
return _byteswap_ushort( value );
}
};

template<> struct SwapEndianess< uint32 >
{
uint32 operator()(uint32 value) const
{
return _byteswap_ulong( value );
}
};

template<> struct SwapEndianess< uint64 >
{
uint64 operator()(uint64 value) const
{
return _byteswap_uint64( value );
}
};

template<typename T>
inline T swapEndianess(T value)
{
return SwapEndianess< T >()( value ); // <--- Error!
}

I added the little comment there at the end to point to the place the compiler is complaining about. The compiler message is,
"1>c:<pathname>\shareaza\hashlib\utility.hpp(221): error C2064: term does not evaluate to a function taking 1 arguments". I posted this problem to "comp.lang.c++", and somebody there suggested I change the original "struct SwapEndianess {};" to "struct SwapEndianess;". When I did that the compiler still complained at the same line saying, "1>c:\<path>\shareaza\hashlib\utility.hpp(221): er_ror C2514: 'SwapEndianess<T>' : class has no constructors". At this point the poster who made the suggestion threw up his arms. He did say, "*If* the original source once compiled but doesn't now, I think you have configuration issues." That's kind of the whole assumption I've been making this whole time, that "the original source once compiled but doesn't now." So can somebody out there tell me what I need to do with this segment of code, or with the configuration issues, so that I can get Shareaza to build?

Kevin S
kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 23 Oct 2010 07:47

User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 23 Oct 2010 16:59

Good morning <raspopov>,

It's encouraging to know that it is possible to build Shareaza with the source code checked out from the SVN library. But I just attempted to build it on my computer, and I'm still getting a "Build FAILED", and the single error message is "shareaza\hashlib\utility.hpp(221): error C2064: term does not evaluate to a function taking 1 arguments", which points right at the "return SwapEndianess< T >()( value );" in the "utility.hpp" file. Could you e-mail me your copy of "hashlib\utility.hpp" maybe, to "kvnsmnsn@hotmail.com", so I can see if it's the same version as mine? If it is the same version as mine, does that mean that I have a different configuration than you do, like the poster on "comp.lang.c++" implied? I'm not sure I know what configuration means, in this context!

Kevin S
kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 23 Oct 2010 17:16

Of course its same, its my local copy goes to SVN and become there current revision. The only difference is a build environment, looks like you using strange compiler (express edition?).
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 23 Oct 2010 17:46

kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 23 Oct 2010 17:56

You can try *censored by moderator* or *censored by moderator*!
Last edited by cyko_01 on 24 Oct 2010 01:07, edited 1 time in total.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Silly story about one man trying to build Shareaza

Postby ailurophobe » 24 Oct 2010 10:26

Shareaza uses an application framework called Microsoft Foundation Classes, Microsoft does not include that with the Express editions, you need Standard or better.

I think somebody claimed once years ago it is possible to use the Express edition to build Shareaza if you have MFC otherwise installed, but I have no idea if that is actually true. Does anyone know?
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 25 Oct 2010 02:23

The story has a happy ending. I got Shareaza built and working!

Kevin S
kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: Silly story about one man trying to build Shareaza

Postby old_death » 25 Oct 2010 13:35

User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Previous

Return to Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron