please help, need help compiling DC++

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

Moderator: Moderators

Locked
squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

please help, need help compiling DC++

Post by squeek » 2004-08-05 16:02

hello
be nice its my first time :roll:
i am running XP Home Edition
i have downloaded everything needed to get started and have installed the SDK Core.
im new to Visual Studio .NET 2003 AE and very much like to learn from you all as i kow nothing :oops:
my first problem is that i start up Visual Studio .NET 2003 and then i open the DC++ source code, what do i need to do next?
second problem is how do i Include the wtl 7.1 and STLPort files???

thanks in advanced

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-05 16:12

I'll be nice :) , It's nice to see newcomers interrested in compiling and get a feel for the source, keep it up!

In the sourcetree you have a file called compile.txt. Read that one carefully and if there's something you don't understand please feel free to come back and ask us about it :)

Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-05 16:19

thank you for your quick responce, i will have a browse at that.
thanks once again

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-05 16:21

No problem, come back if you want help or don't understand it, we'll help you
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-05 16:31

hehe i cant even find the sourcetree :oops:
when opening Visual Studio .net and loading up dcplusplus project i see on the left, 2 sections (one on top of another) called
solution explorer (on top)
dynamic help (below)
i see the project in the solution explorer window with the files ...
bzip2
client
DCPlusPlus
MakeDefs
zlib

i cant see a file named compile.txt?

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-05 16:36

bzip2
client
DCPlusPlus
MakeDefs
zlib

Are actually folders, expand them and you'll see files. trial and error :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-05 16:46

aha i found it but this is what my 2nd question was...

How to compile in 4 easy steps:

1) Make sure you've downloaded the WTL 7.1 Package and have all the files in it in your include path.
You can find it on the dc++ sourceforge site. Mind the version.

2) Make sure you have stlport installed and that it's included _before_ the standard vc directories
Use the one supplied on the dc++ sourceforge page (do not use the one from www.stlport.org unless
you know what you're doing, I've modified it a little bit). Mind the version (download the latest
one from the source extras).

How do i Include these files and where? remember i am totally new to this and im trying to learn from you guys. its been a long time since i have used C++ :(

Gasman1015
Posts: 184
Joined: 2003-05-26 11:29
Location: UK

Post by Gasman1015 » 2004-08-05 17:25

Create a folder wtl7.1 and another Stlport46.2, extract the files you have downloaded into the relevant folders.

Within VS net 2003, Tools -> Options -> Projects -> VC++ Directories, In right hand corner, drop down box select -> include files.

Open new line from icon below drop down box and browse to the Wtl folder, click open and repeat for the Stl folder.
Stl folder should be at the top of your list.

Go back to main window, select Debug or Release, then Build -> build solution.

Good Luck
Always remember you're unique, just like everyone else.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-05 17:36

wow thanks, now that i can understand.
i'm just not used to this new MS Visual Studio .net 2003. lots of new things on there i dont understand but the programming side i should be ok (hopefully)
thanks again :)

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-05 18:26

back again :roll:
i did all that in the order you said and i got no errors :) but i had 5 warnings?
this was what i got when i clicked on (build solution)...

------ Build started: Project: bzip2, Configuration: Debug Win32 ------

Compiling...
randtable.c
huffman.c
decompress.c
crctable.c
compress.c
bzlib.c
blocksort.c
Generating Code...
Creating library...

Build log was saved at "file://e:\DC++ Project\DC++ Project\vc7\Debug\bzip\BuildLog.htm"
bzip2 - 0 error(s), 0 warning(s)


------ Build started: Project: zlib, Configuration: Debug Win32 ------

Compiling...
zutil.c
uncompr.c
trees.c
inftrees.c
inflate.c
inffast.c
deflate.c
crc32.c
compress.c
adler32.c
Generating Code...
Creating library...

Build log was saved at "file://e:\DC++ Project\DC++ Project\vc7\Debug\zlib\BuildLog.htm"
zlib - 0 error(s), 0 warning(s)


------ Build started: Project: client, Configuration: Debug Win32 ------

Compiling...
stdinc.cpp
Compiling...
ZUtils.cpp
Util.cpp
UserConnection.cpp
User.cpp
UploadManager.cpp
TimerManager.cpp
TigerHash.cpp
Thread.cpp
StringTokenizer.cpp
StringDefs.cpp
Socket.cpp
SimpleXML.cpp
ShareManager.cpp
SFVReader.cpp
SettingsManager.cpp
ServerSocket.cpp
SearchManager.cpp
ResourceManager.cpp
QueueManager.cpp
NmdcHub.cpp
e:\DC++ Project\DC++ Project\client\NmdcHub.cpp(37) : warning C4355: 'this' : used in base member initializer list
e:\DC++ Project\DC++ Project\client\NmdcHub.cpp(368) : warning C4245: 'initializing' : conversion from '' to '_STL::basic_string<_CharT,_Traits,_Alloc>::size_type', signed/unsigned mismatch
with
[
_CharT=char,
_Traits=_STL::char_traits<char>,
_Alloc=_STL::allocator<char>
]
Generating Code...
Compiling...
LogManager.cpp
HubManager.cpp
HttpConnection.cpp
HashManager.cpp
FinishedManager.cpp
Encoder.cpp
e:\DC++ Project\DC++ Project\client\Encoder.cpp(36) : warning C4244: '=' : conversion from 'int' to 'u_int8_t', possible loss of data
e:\DC++ Project\DC++ Project\client\Encoder.cpp(44) : warning C4244: '=' : conversion from 'int' to 'u_int8_t', possible loss of data
DownloadManager.cpp
DirectoryListing.cpp
DCPlusPlus.cpp
CryptoManager.cpp
ConnectionManager.cpp
ClientManager.cpp
Client.cpp
BZUtils.cpp
BufferedSocket.cpp
ADLSearch.cpp
AdcHub.cpp
e:\DC++ Project\DC++ Project\client\AdcHub.cpp(237) : warning C4100: 'aFileType' : unreferenced formal parameter
Generating Code...
Creating library...

Build log was saved at "file://e:\DC++ Project\DC++ Project\vc7\Debug\client\BuildLog.htm"
client - 0 error(s), 5 warning(s)


------ Build started: Project: DCPlusPlus, Configuration: Debug Win32 ------

Compiling...
Stdafx.cpp
Compiling...
WinUtil.cpp
UsersFrame.cpp
UploadPage.cpp
UCPage.cpp
TreePropertySheet.cpp
TransferView.cpp
TextFrame.cpp
StatsFrame.cpp
SpyFrame.cpp
e:\DC++ Project\DC++ Project\windows\SpyFrame.cpp(155) : warning C4245: 'initializing' : conversion from '' to '_STL::basic_string<_CharT,_Traits,_Alloc>::size_type', signed/unsigned mismatch
with
[
_CharT=char,
_Traits=_STL::char_traits<char>,
_Alloc=_STL::allocator<char>
]
SearchFrm.cpp
QueueFrame.cpp
PublicHubsFrm.cpp
PropPage.cpp
PropertiesDlg.cpp
PrivateFrame.cpp
NotepadFrame.cpp
MainFrm.cpp
main.cpp
HubFrame.cpp
e:\DC++ Project\DC++ Project\windows\HubFrame.cpp(801) : warning C4245: 'initializing' : conversion from '' to '_STL::basic_string<_CharT,_Traits,_Alloc>::size_type', signed/unsigned mismatch
with
[
_CharT=char,
_Traits=_STL::char_traits<char>,
_Alloc=_STL::allocator<char>
]
GeneralPage.cpp
Generating Code...
Compiling...
FinishedULFrame.cpp
FinishedFrame.cpp
FavoritesFrm.cpp
FavHubProperties.cpp
ExtendedTrace.cpp
ExListViewCtrl.cpp
DownloadPage.cpp
DirectoryListingFrm.cpp
CommandDlg.cpp
AppearancePage.cpp
AdvancedPage.cpp
Advanced2Page.cpp
ADLSProperties.cpp
ADLSearchFrame.cpp
Generating Code...
Compiling resources...
Linking...

Build log was saved at "file://e:\DC++ Project\DC++ Project\vc7\Debug\windows\\BuildLog.htm"
DCPlusPlus - 0 error(s), 2 warning(s)


------ Skipped Build: Project: MakeDefs, Configuration: Debug Win32 ------

Project configuration skipped because it is not selected in this solution configuration


---------------------- Done ----------------------

Build: 4 succeeded, 0 failed, 1 skipped



ive used all the files from dc++ at sourceforge.net, maybe i did something wrong?

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

Post by GargoyleMT » 2004-08-05 21:02

They're warnings, not errors.

If you read them, they make sense. (You understand or are learning C++, I hope.)
squeek wrote: Build: 4 succeeded, 0 failed, 1 skipped
4 successes, zero failures, one project skipped (MakeDefs - don't worry about it just yet. or search the forum, your choice.)

Gasman1015
Posts: 184
Joined: 2003-05-26 11:29
Location: UK

Post by Gasman1015 » 2004-08-06 01:22

OK, your up and running, look in the folder where the source is located and you will see the folder APP, inside is your newly compiled DC. :)
Always remember you're unique, just like everyone else.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-06 01:38

squeek wrote:back again :roll:
i did all that in the order you said and i got no errors :) but i had 5 warnings?
this was what i got when i clicked on (build solution)...
You see, wasn't that hard, was it ? :) , Now you just have to sit down and look at what the code actually does - prepare yourself for a long, timeconsuming, sometimes frustrating but amazingly interresting journey :)

Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-06 03:11

i understand a little C++ from some time ago, its just getting to know how to use the compiler as there are so many new options. i apperciate the help, i couldnt do it without your help.i doubt if i will ever create anything special but it would be nice to see how a client if put together. i find it really interesting.
btw if a part was skipped when compiling, wouldnt it effect the final outcome?
thanks

krueger00
Posts: 7
Joined: 2003-04-03 11:33

can't find namespace _STL

Post by krueger00 » 2004-08-20 10:44

i've followed the compile.txt procedure and also used the additional instructions here.

but unfortunatly, my VC++.NET (2003) cannot find the _STL namespace :(

in compile.txt it's written
Make sure you have stlport installed and ....
now i couldn't really install it, as there were only header-files (and files without extension), no executable, no nothing.

can someone identify what my problem could be? i'd be very thankful for any advice :)



ps: oh... and wouldn't it be easier and neater to pack these stl- and wtl-files into libraries (i come from a java background... maybe it's not possible in C++) and have the dc++ project already reference these?

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

Re: can't find namespace _STL

Post by GargoyleMT » 2004-08-20 12:43

You have to add STLPort and WTL to your include path in Visual Studio. Tools > Options > Projects > VC++ Directories > Include

krueger00
Posts: 7
Joined: 2003-04-03 11:33

Re: can't find namespace _STL

Post by krueger00 » 2004-08-20 14:31

GargoyleMT wrote:You have to add STLPort and WTL to your include path in Visual Studio. Tools > Options > Projects > VC++ Directories > Include
ok, it's proven... i'm dumber than a glass of water!! :roll:

i actually did all of that, but didn't switch the paths from "executable" to "include". sorry about the wasting of your time and thanks for your help!

:D

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

Re: can't find namespace _STL

Post by GargoyleMT » 2004-08-24 11:39

krueger00 wrote:i actually did all of that, but didn't switch the paths from "executable" to "include".
I think that's a common first time problem. :)

Locked