Silly story about one man trying to build Shareaza

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

Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 19 Oct 2010 19:23

I need to use Shareaza to search for files on the Internet and download them using Gnutella. I downloaded the Shareaza source code to my computer, but I noticed that what I ended up with are ".dll" files, not executable files, and there's no <main()> method in the C++ source code. I've been told that Shareaza is just a library, for a C++ program to use to do things like search for files on the Internet and download them. Can anyone tell me how I would do that, what Shareaza functions I might call to search for files and which functions I might call to download some of those files? I'd greatly appreciate any information you can give me.

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

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 20 Oct 2010 00:35

Okay, I think I may have jumped the gun with that last post. I downloaded the Shareaza source code from website "http://sourceforge.net/projects/shareaza" and got it into VisualStudio. I tried to run it, and got a complaint about a ".dll" file. I posted my experience to "comp.lang.c++", and people on that forum told me that a ".dll" wasn't an executable file, and that the way it looked to them was that Shareaza was just a library for other C++ programs to use, and wasn't a stand-alone program. (Is that right?)

It was only since then that it dawned on me that I had never attempted to _actually build_ Shareaza. So I clicked on <Build->Build Solution>, and it did a lot of processing but ultimately told me the build failed. I haven't made any changes to the source code yet, so is it expected that the build would fail on what I downloaded from that website?

Anyhow, I scrolled up in the build window to the last "Build FAILED" announcement. It said that the build needed to copy "..\HashLib\Win32\Debug\HashLib.dll" to a "Debug" directory, but couldn't find the "HashLib.dll" file.

The "Build FAILED" announcement before that said "TortoiseSVN COM-interface failed." It suggested I "(Re)Install it from: http://tortoisesvn.net/". A short distance above that the build was copying a bunch of files and in the middle of all that it said, "The system cannot find the file specified," and on the next line it listed "propidl.idl".

The "Build FAILED" announcement before _that_ listed off a whole bunch of "include files" it couldn't open, but they all turned out to be the same file, namely "boost/cstdint.hpp"; of it it said "No such file or directory".

Those were the only error messages.

Now I could certainly go to "http://tortoisesvn.net" and try to install the "TortoiseSVN COM-interface", but I don't have a clue how to fix any of the other problems the build experienced. Is there anybody out there who could help me with them? I'd really appreciate any help anyone can give me.

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

Re: How to Write a C++ Program to Search for and Download Files

Postby cyko_01 » 20 Oct 2010 13:04

moving to Development Discussion
User avatar
cyko_01
 
Posts: 938
Joined: 13 Jun 2009 15:51

Re: How to Write a C++ Program to Search for and Download Files

Postby cyko_01 » 20 Oct 2010 13:12

no, Shareaza is definitely not just a lib for other C++ programs. You can download the executable HERE. You can find build instruction here. if you need more assistance hopefully one of the devs will stop to take a look at this thread
User avatar
cyko_01
 
Posts: 938
Joined: 13 Jun 2009 15:51

Re: How to Write a C++ Program to Search for and Download Files

Postby old_death » 20 Oct 2010 17:22

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

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 20 Oct 2010 17:38

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

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 20 Oct 2010 17:56

I probably should mention that my O/S is Windows XP, and that's likely the reason why I couldn't extract any files from the ".tar.gz" file.

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

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 20 Oct 2010 20:59

I took a look at the documentation for Boost, and it looked like I didn't need to have the Shareaza code before I had Boost, so I downloaded "boost_1_44_0.zip" and "boost-jam-3.1.11-1-ntx86.zip" just like the sourceForge "Developers.GettingStarted.Boost" webpage said to do. I moved the "bjam.exe" file from "boost-jam-3.1.11-1-ntx86\boost-jam-3.1.11-1-ntx86" to "boost_1_44_0\boost_1_44_0" just like it said to. Then I went down into that last directory and executed "bjam {{{1}}}", once again, just like it said to.

That resulted in a complaint that I needed to have version 3.1.12 or later. So I downloaded "boost-jam-3.1.12-1-ntx86.zip" and extracted its files from it, and then moved _its_ "bjam.exe" into the "boost_1_44_0\boost_1_44_0" directory, and ran "bjam {{{1}}}". That resulted in the following warnings and notes:

warning: No toolsets are configured.
warning: Configuring default toolset "msvc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: http://boost.org/boost-build2/doc/html/ ... ation.html
notice: could not find main target {{{1}}}
notice: assuming it is a name of file to create.
nBuilding the Boost C++ Libraries.nn
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: otherwise, you can safely ignore this message.
warning: No python installation configured and autoconfiguration
note: failed. See http://www.boost.org/libs/python/doc/building.html
note: for configuration instructions or pass --without-python to
note: suppress this message and silently skip all Boost.Python targets
don't know how to make <e>{{{1}}}
...found 1 target...
...can't find 1 target...

The webpage said after executing "bjam {{{1}}}" to go off and take a coffee break, because it was going to "take several minutes for bjam to have Visual Studio compile the boost library"; however it took only about two minutes for it to spew out the above error messages and die. And it didn't even create the "C:\Boost" directory the webpage said it would create.

I don't know what I've done wrong. I tried to download the latest Boost to get the most functionality. Should I have gone with an earlier version like "boost_1_33_1"? Should I have passed additional arguments to "bjam.exe"? The webpage didn't say anything about that.

Also, I still need answers to how to download the Shareaza source from two posts back.

Kevin S
Last edited by kvnsmnsn on 20 Oct 2010 21:11, edited 1 time in total.
kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: How to Write a C++ Program to Search for and Download Files

Postby raspopov » 20 Oct 2010 21:07

No need to compile boost itself, Shareaza uses boost as includes only.

Download and install TortoiseSVN then "SVN Checkout..." Shareaza sources ("trunk").
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 20 Oct 2010 23:22

Last edited by cyko_01 on 21 Oct 2010 00:33, edited 3 times in total.
Reason: please use proper formatting (like the quote button and tags). it makes your posts easier to read
kvnsmnsn
 
Posts: 40
Joined: 19 Oct 2010 19:13

Re: How to Write a C++ Program to Search for and Download Files

Postby raspopov » 21 Oct 2010 03:16

Please RTFM about SF SVN (viewvc is a SVN web viewer).
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 21 Oct 2010 15:43

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

This Is Getting Real Frustrating

Postby kvnsmnsn » 21 Oct 2010 16:01

I've been trying since the beginning of this week to get the source code for Shareaza so that I can build it, get it working, and then make the modifications to the source code I've been assigned to make. A lot of people have given me a lot of pointers and pointed me to a lot of websites to help me achieve these goals, but none of them have worked. I'm getting really frustrated over following what some documentation says to the letter, and getting error messages instead of results. Does anyone know of any way to download Shareaza source code that they are reasonably sure will work?

I've got TortoiseSVN installed, so if it's a matter of checking the source code out I can do that. But checking them out from the "http://shareaza.svn.sourceforge.net/viewvc/shareaza/trunk" repository doesn't work; when I tried that I got an error message saying the repository was moved temporarily.

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

Re: This Is Getting Real Frustrating

Postby old_death » 21 Oct 2010 16:41

Are you sure this hasn't been a temporary problem with SourceForge?
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19


Re: This Is Getting Real Frustrating

Postby kvnsmnsn » 21 Oct 2010 18:00

old_death wrote:

=Are you sure this hasn't been a temporary problem with SourceForge?

How temporary is temporary? I tried it yesterday afternoon and got the error message I posted to the other thread. I tried it just now and got the same error message. If the problem is a temporary one, but lasts five days, it's going to kill me. On the other hand, if "temporary" means 24 hours I should be all right. I guess I'll just keep trying it every hour or so. Is there anything more I can do than that?

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

Re: How to Write a C++ Program to Search for and Download Files

Postby kvnsmnsn » 21 Oct 2010 18:41

Thank you, thank you <old_death>!! I read the (blankety-blank) manual, or at least the document that appeared at the top of the link you included, and it said to use repository "https://shareaza.svn.sourceforge.net/svnroot/shareaza/trunk" instead of "http://shareaza.svn.sourceforge.net/viewvc/shareaza/trunk" like the other documentation said, and that did the trick. It looks like the whole Shareaza source code set got downloaded.

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

Re: This Is Getting Real Frustrating

Postby raspopov » 21 Oct 2010 18:56

SF working fine.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: This Is Getting Real Frustrating

Postby old_death » 21 Oct 2010 20:29

Seems the problem has been fixed:
viewtopic.php?f=5&t=913&view=unread#p6116
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: How to Write a C++ Program to Search for and Download Files

Postby old_death » 21 Oct 2010 20:34

No problem. :) I'm here to help...
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: This Is Getting Real Frustrating

Postby kvnsmnsn » 21 Oct 2010 21:25

As I stated on the other thread, I was finally able to check out all the Shareaza files. I tried to build it, and got a couple of error messages. One of them was a complaint that it didn't understand "gzip", and I fixed that by installing "gzip"; it doesn't complain about that any more. The next time I tried to compile it I got the same old complaint and a new one, but they're both complaining about the same file:

1>c:\documents and settings\old fogies\kevin\baytsp\shareaza\hashlib\utility.hpp(25): fatal error C1083: Cannot open include file: 'boost/cstdint.hpp': No such file or directory
2>c:\documents and settings\old fogies\kevin\baytsp\shareaza\shareaza\stdafx.h(188): fatal error C1083: Cannot open include file: 'boost/cstdint.hpp': No such file or directory

Now I was told earlier that I didn't need to worry about "boost" not downloading and compiling, but it looks to me here like the absence of "boost" is keeping Shareaza from building. I followed along the instructions on the sourceForge "Developers.GettingStarted.Boost" page to download and compile "boost" up to the point of moving "bjam.exe" to my "boost_1_44_0\boost_1_44_0" directory alongside "boost.css". The next step, says that web page, is to navigate to the directory where "bjam.exe" and execute "{{{1}}}". I took it that meant execute "bjam {{{1}}}". [Is that assumption a mistake?] Anyhow, I tried that command and got the output:

warning: No toolsets are configured.
warning: Configuring default toolset "msvc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: http://boost.org/boost-build2/doc/html/ ... ation.html
notice: could not find main target {{{1}}}
notice: assuming it is a name of file to create.
nBuilding the Boost C++ Libraries.nn
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: otherwise, you can safely ignore this message.
warning: No python installation configured and autoconfiguration
note: failed. See http://www.boost.org/libs/python/doc/building.html
note: for configuration instructions or pass --without-python to
note: suppress this message and silently skip all Boost.Python targets
don't know how to make <e>{{{1}}}
...found 1 target...
...can't find 1 target...

So it looks like something is going wrong, and in particular this command didn't create the "C:\Boost" directory like the webpage said it would. And of course, as I indicated above, when I try to build Shareaza I get complaints that Boost files are missing, so I obviously haven't compiled Boost enough to build Shareaza. Does anyone have any idea what I need to do to get the Boost files I need?

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

Re: This Is Getting Real Frustrating

Postby kvnsmnsn » 21 Oct 2010 22:28

I installed Python and then ran "bjam {{{1}}}" again, and that got rid of the complaints about Python, but I'm still getting:

don't know how to make <e>{{{1}}}
...found 1 target...
...can't find 1 target...

and this is still not generating the "C:\Boost" directory. Any ideas anyone?

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

Re: This Is Getting Real Frustrating

Postby raspopov » 22 Oct 2010 03:26

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

Not Quite as Frustrating

Postby kvnsmnsn » 22 Oct 2010 04:26

raspopov wrote:

=No need to compile boost itself, Shareaza uses boost as includes only.
=
=Download and install TortoiseSVN then "SVN Checkout..." Shareaza sources ("trunk").

in response to my last post on the "This Is Getting Real Frustrating" thread. When I first saw this I thought that was great; I didn't have to worry about getting boost compiled. But then when I tried to use VisualStudio to build Shareaza it started complaining about a missing "boost/cstdint.hpp" file, which absence was enough to make the build fail. What do I need to do with boost in order to keep that file's absence from killing my Shareaza build?

Also, by the way, does anybody know why the "This Is Getting Real Frustrating" thread got locked? I was going to post this to the end of that, but because it was locked I couldn't.

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

Re: Not Quite as Frustrating

Postby old_death » 22 Oct 2010 09:15

I don't know why it got locked...

Anyway, you know that you can insert quotes using these tags: [quote="username"]the text you'd like to quote[/quote] ?
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Silly story about one man trying to build Shareaza

Postby ailurophobe » 22 Oct 2010 15:10

Where exactly does it say to use "http://shareaza.svn.sourceforge.net/viewvc/shareaza/trunk" for checking out the source? Because somebody should fix that...
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Not Quite as Frustrating

Postby ailurophobe » 22 Oct 2010 15:22

The .hpp file is one of the includes raspopov mentioned.

You still need to install boost on you system and tell Visual Studio where to find it. (Add the path to the includes for the project? been few years since I did this) You don't need to compile it whenever you compile Shareaza. (Or usually at all I think... I think it is pre-compiled and just gets linked on install or something like that...)

And the thread probably got locked since it was redundant to another thread you had? Just a guess...
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 15:25

(all topics merged)
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 17:21

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

Re: Not Quite as Frustrating

Postby kvnsmnsn » 22 Oct 2010 17:54

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

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 18:02

So use VS2010 user property sheet to specify boost include paths.
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 18:38

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

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 18:59

обмена-1.gif
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 20:01

Wow, <raspopov>, you made it look like the answer to my problem was right up there on the screen. But it's so
small I'm having trouble reading it. It looks like you've got the Property Manager box up there on the upper
left, with a bunch of icons in it. It looks like the Shareaza icon has been expanded (is that right?), and a
yellow Debug icon below it has also been expanded, which amounts to four icons below it.

What did you do then? Did you maybe double click on the "Microsoft.Cpp.Win32.user" icon? It's slightly shaded in
your display so it looks like you may have done that, but when I do that I get a different box than is showing up
on your display. The label looks the same; I get "Microsoft.Cpp.Win32.user Property Pages" just like you did, but
the entries in that box are:

Output Directory
Intermediate Directory
Target Name
Target Extension
Extensions to Delete on Clean
Build Log File

Those don't look like the entries in your Property Pages box and, perhaps more to the point, none of them look
like obvious choices for a path to put Boost on so my project can see the the "boost_1_44\boost\cstdint.hpp" file.
It looks like you've selected the second entry in your box; the second entry in my box is "Intermediate
Directory"; can that really be where I add the path to "cstdint.hpp"?

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

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 20:05

Click image to zoom it.
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 20:07

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

Re: Silly story about one man trying to build Shareaza

Postby kvnsmnsn » 22 Oct 2010 21:09

Thank you thank you <raspopov>!! My build now has visibility to everything it needs!

Now I'm running into actual compilation problems. When I try to build Visual Studio complains about
"Shareaza\HashLib\Utility.hpp", saying when it calls <_BitScanReverse()> it's passing in an <uint32 *> as the
first argument, but it needs a <DWORD *> argument, and it can't convert from the former to the latter. And it has
the same to say about <_BitScanForward()>; its first argument is a <uint32 *> and it needs to be a <DWORD *>.

My first reaction was to attempt to debug it, so I went looking for where <_BitScanReverse()> and
<BitScanForward()> are declared, just to verify that each of their first arguments are in fact <DWORD *>s. So I
did a recursive search on <_BitScanReverse()> and <_BitScanForward()>, and the only places those functions are
mentioned are in "Utility.hpp"! How can "Utility.hpp" make references to two functions that aren't defined
anywhere?

I also got to thinking that maybe I shouldn't tinker with the code. I need to get it running as it's currently
written. Which means I have to figure out why the checked out code is generating compile errors. Does this mean
I have things set up wrong? Anybody have any ideas?

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

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 21:44

What Windows SDK version you using?
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 21:49

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

Re: Silly story about one man trying to build Shareaza

Postby raspopov » 22 Oct 2010 21:57

What Windows SDK version you using?
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Next

Return to Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest