Need help compiling

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

Moderator: Moderators

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Need help compiling

Post by cherrio » 2003-02-17 16:47

Hi,

First DC++ is the best peer to peer client I have ever come across, thanks :-)

After using DC++ for a few months now I got this crazy notion to download the source and try and compile it!

Straight off, I downloaded the main file, then read the compile.txt file, downloaded the sdk and the other files, but still having trouble.

I know some C++, and I am using VC++ 6, haven't done any real GUI C++ stuff, mostly command line stuff.

Any way, my problem. The module "stlport", how exactly do I install it??

And how do I ensure it is "included _before_ the standard vc directories".

Again, how do I "Make sure that this sdk is included _before_ the standard vc directories."?

The error the VC is giving is: fatal error C1083: Cannot open include file: '_hash_map.h': No such file or directory. Probably related to the stlport not being installed correctly.

Any ideas any one?

TIA,
Robert

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

Re: Need help compiling

Post by GargoyleMT » 2003-02-17 17:16

cherrio wrote:Any way, my problem. The module "stlport", how exactly do I install it??
And how do I ensure it is "included _before_ the standard vc directories".


Put it in a directory and include it. Visual Studio.NET uses: Tools>Options>Projects>VC++ Directories>Include Files (from the dropdown).

The list of include directories is just a list, and there's arrow buttons to move the included directory up or down in the order.

If you have further compilation problems, the Developer's Help topic is probably where to put them...

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-02-17 19:50

thanks, I have made a post to the other "Help" forum, http://dcplusplus.sourceforge.net/forum ... .php?t=982

I did want you suggested, got rid of that error, but now I got 11 others in its place!

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

Re: Need help compiling

Post by sarf » 2003-02-17 20:17

cherrio wrote:After using DC++ for a few months now I got this crazy notion to download the source and try and compile it!

Well, take a hot bath, make sure to get Thai foot massage, eat some cheese and drink some excellent Merlot wine, and you'll notice that these cravings disappear after a while. :)

cherrio wrote:Straight off, I downloaded the main file, then read the compile.txt file, downloaded the sdk and the other files, but still having trouble.

You are not alone in this.

cherrio wrote:Any way, my problem. The module "stlport", how exactly do I install it?

By being very, very careful and by not cutting the red wire.

Seriously speaking, in Visual Studio 6.0, do this:

Decompress the stlport somewhere (preferably in its own directory).
Decompress the wtl-thingy somewhere different from the above mentioned directory.

Run Visual Studio.
Go to Tools->Options->Directories
(make sure that "Platform" is set to "Win32" and that "Show directories for..." is set to "Include files").
Now, insert the two directories to the stlport and the wtlport.
Move the stlport to the top of the list.
Move the wtl to just below the stlport.
Make sure that the SDK directory is just below the wtl.
Press "OK".
Load the DC++ workspace.
Compile.
Enjoy the 24 warnings about strange command line options that are irrelevant.

Sarf
---
I never remember a face, but I always forget a name.

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-02-17 20:32

Hi Sarf,

thanks for the info :D

Just moving the stlport and wtl paths up, I dropped 8 of te 11 errors :-)

Just one questions, what eactly do you mean by,
"Make sure that the SDK directory is just below the wtl. "

Currently the SDK is installed at,
D:\Program Files\Microsoft SDK\
STLPORT
D:\share\dc++\stlport\
WTL
D:\share\dc++\wtl\

Should I move the stlport and wtl directories somewhere else?

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-02-17 20:35

opps forgot, the errors I am now geting are (which seem to be the same ones 1 or 2 other people got)

Compiling...
stdinc.cpp
d:\share\dc++\stlport\stl\_threads.h(116) : error C2733: second C linkage of overloaded function 'InterlockedIncrement' not allowed
d:\share\dc++\stlport\stl\_threads.h(116) : see declaration of 'InterlockedIncrement'
d:\share\dc++\stlport\stl\_threads.h(117) : error C2733: second C linkage of overloaded function 'InterlockedDecrement' not allowed
d:\share\dc++\stlport\stl\_threads.h(117) : see declaration of 'InterlockedDecrement'
d:\share\dc++\stlport\stl\_threads.h(118) : error C2733: second C linkage of overloaded function 'InterlockedExchange' not allowed
d:\share\dc++\stlport\stl\_threads.h(118) : see declaration of 'InterlockedExchange'
Error executing cl.exe.

client.lib - 3 error(s), 0 warning(s)

Phantom
Posts: 72
Joined: 2003-01-12 01:13
Location: New Zealand

compiling

Post by Phantom » 2003-02-17 20:39

Not sure if this is relevant to you, but when I first tried to get it to compile, the STL and WTL off the 'pretty' ( http://dcplusplus.sourceforge.net ) dc++ site didn't work. I got the ones from the actuall sourceforge site ( http://sourceforge.net/project/showfile ... e_id=62964 ). WTL7.0 and STL4.5.3

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-02-17 21:00

Ya, I am using those versions as well. Think I might do up a little readme file about compiling it once I get this working.

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

Post by sarf » 2003-02-18 09:49

cherrio wrote:thanks for the info :D

You're welcome.

cherrio wrote:Just moving the stlport and wtl paths up, I dropped 8 of te 11 errors :-)

Not far enough, it seems.

cherrio wrote:Just one questions, what eactly do you mean by,
"Make sure that the SDK directory is just below the wtl. "

The SDK should be BELOW the WTL. At least, that's the way it is on my computer, and it works there (TM).

cherrio wrote:Currently the SDK is installed at,
D:\Program Files\Microsoft SDK\
STLPORT
D:\share\dc++\stlport\
WTL
D:\share\dc++\wtl\

Wrong. Error. Beep.

Move the SDK down BELOW the WTL directory.

cherrio wrote:Should I move the stlport and wtl directories somewhere else?

Yes.
See above.

Sarf
---
A bad case of lead poisoning tends to weed out the undesirables.

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-02-18 10:27

Hi,

when you say,
> Move the SDK down BELOW the WTL directory

Do you mean physically,
i.e.
D:\Program Files\Microsoft SDK\stlport\
and
D:\Program Files\Microsoft SDK\wtl\

I tried the above and it has made no difference:-(

Any more quggestions?

thanks for the help,
Robert

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

Post by GargoyleMT » 2003-02-18 17:15

cherrio wrote:> Move the SDK down BELOW the WTL directory

Do you mean physically,


No, he didn't mean "in a subdirectory of", he meant something like this: in the list of include directories, order matters, so it is important that the STL include directories show up before the Platform SDK.

Also, are you using the STLPort files from the DC++ website? If you went to the official STLPort site and downloaded the STLPort there, the include files are in an include\ subdirectory.

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-03-19 18:16

Hi,

Im back at it agin, with the 2.4 version!

After reading: http://dcplusplus.sourceforge.net/forum ... dincrement and seeing the graphic I managed to get passed the "Interlock" problem.

So I have complied it again, it now comes up with 38 warnings (the complie.txt said to expect this) and 2 errors, the errors are,

C:\complie\DC++\client\ShareManager.cpp(74) : error C2371: 'i' : redefinition; different basic types
C:\complie\DC++\client\ShareManager.cpp(69) : see declaration of 'i'
C:\complie\DC++\client\ShareManager.cpp(75) : error C2227: left of '->second' must point to class/struct/union

Any suggestions?

thanks for the help so far.

Neg
Posts: 20
Joined: 2003-01-19 12:05

Post by Neg » 2003-03-19 18:55

Change the name of the iterator to something else? There is a post about this somewhere else on the forums i think.

cherrio
Posts: 28
Joined: 2003-02-17 14:02

Post by cherrio » 2003-03-20 10:17

I tried that, but it just produces different errors (bellow).

MainFrm.obj : error LNK2001: unresolved external symbol "public: static class ADLSearchFrame * ADLSearchFrame::frame" (?frame@ADLSearchFrame@@2PAV1@A)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnEndLabelEditList(int,struct tagNMHDR *,int &)" (?OnEndLabelEditList@ADLSearchFrame@@QAEJHPAUtagNMHDR@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnDoubleClickList(int,struct tagNMHDR *,int &)" (?OnDoubleClickList@ADLSearchFrame@@QAEJHPAUtagNMHDR@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnMoveDown(unsigned short,unsigned short,struct HWND__ *,int &)" (?OnMoveDown@ADLSearchFrame@@QAEJGGPAUHWND__@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnMoveUp(unsigned short,unsigned short,struct HWND__ *,int &)" (?OnMoveUp@ADLSearchFrame@@QAEJGGPAUHWND__@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnRemove(unsigned short,unsigned short,struct HWND__ *,int &)" (?OnRemove@ADLSearchFrame@@QAEJGGPAUHWND__@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnAdd(unsigned short,unsigned short,struct HWND__ *,int &)" (?OnAdd@ADLSearchFrame@@QAEJGGPAUHWND__@@AAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnContextMenu(unsigned int,unsigned int,long,int &)" (?OnContextMenu@ADLSearchFrame@@QAEJIIJAAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnClose(unsigned int,unsigned int,long,int &)" (?OnClose@ADLSearchFrame@@QAEJIIJAAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall ADLSearchFrame::OnCreate(unsigned int,unsigned int,long,int &)" (?OnCreate@ADLSearchFrame@@QAEJIIJAAH@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: void __thiscall ADLSearchFrame::UpdateLayout(int)" (?UpdateLayout@ADLSearchFrame@@QAEXH@Z)
client.lib(DirectoryListing.obj) : error LNK2001: unresolved external symbol "protected: static class ADLSearchManager * Singleton<class ADLSearchManager>::instance" (?instance@?$Singleton@VADLSearchManager@@@@1PAVADLSearchManager@@A)
client.lib(DCPlusPlus.obj) : error LNK2001: unresolved external symbol "protected: static class ADLSearchManager * Singleton<class ADLSearchManager>::instance" (?instance@?$Singleton@VADLSearchManager@@@@1PAVADLSearchManager@@A)
client.lib(DCPlusPlus.obj) : error LNK2001: unresolved external symbol "public: void __thiscall ADLSearchManager::Load(void)" (?Load@ADLSearchManager@@QAEXXZ)
client.lib(DCPlusPlus.obj) : error LNK2001: unresolved external symbol "public: void __thiscall ADLSearchManager::Save(void)" (?Save@ADLSearchManager@@QAEXXZ)
App/DCPlusPlus.exe : fatal error LNK1120: 14 unresolved externals
Error executing link.exe.

DCPlusPlus.exe - 16 error(s), 2 warning(s)

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

Post by GargoyleMT » 2003-03-20 13:37

The solution to that was mentioned in another thread: update the VC6 project to include the ADLSearch.cpp/h in the client project, and the ADLSearchFrame.cpp/h in the windows project.

Who is online

Users browsing this forum: Google [Bot] and 0 guests