newbie; unresolved external * 31

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

Moderator: Moderators

Locked
thisOne
Posts: 6
Joined: 2004-12-26 13:33

newbie; unresolved external * 31

Post by thisOne » 2004-12-26 17:29

I download DC++ 0,668 and I do all things written in compile.txt but i have 31errors, all identic:
unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)

If someone understand me (sorry for my english) , and know what is screwed ;) Please answer.
my machine ;) is WinXp and i use ms vs.Net 2003

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

Post by Guitarm » 2004-12-26 18:03

Should I give you a fish or teach you fishing? :)

You've probably missed a include, either stlport or wtl. Mine looks like this:
(VC++ Directories -> Include files)
F:\DCPlusPlus\includes\wtl\wtl75_4291\include
F:\DCPlusPlus\includes\stl\DCPlusPlus-STLPort-4.6.2

And then of course....google is always your friend : http://www.google.se/search?hl=sv&q=unr ... ning&meta=
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

thisOne
Posts: 6
Joined: 2004-12-26 13:33

Post by thisOne » 2004-12-26 18:21

well, if it is not a problem for You i would like to get fish;)
But serious, did You (or anyone) know where is bug, all error messages contain the same symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ) so i think its some trivial mistake but i can't find it.
Once again help please /*and of course forgive my english*/

ullner
Forum Moderator
Posts: 333
Joined: 2004-09-10 11:00
Contact:

Post by ullner » 2004-12-26 19:57

Do you have WTL and STL properly included? Which versions of WTL and STL?

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

Post by GargoyleMT » 2004-12-27 12:51

thisOne wrote:But serious, did You (or anyone) know where is bug, all error messages contain the same symbol
Exceptions are used all over the DC++ source. Also, to be perfectly clear, you are using the DC++ source code from this site, not another client based on DC++?

thisOne
Posts: 6
Joined: 2004-12-26 13:33

Post by thisOne » 2004-12-27 18:13

Yeap, all of my _DC_source_stuff_ come from this site. I've got still 31 f...n unresolved external errors, and i mightily desire to rummage DC.

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

Post by Guitarm » 2004-12-27 18:58

Ok, are you absolutely sure you have the right versions of ATL and STL for the version of DC++ you are trying to compile?. And again - are you sure you have included them the right way?
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

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

Post by joakim_tosteberg » 2004-12-28 02:42

Guitarm wrote:Ok, are you absolutely sure you have the right versions of ATL and STL for the version of DC++ you are trying to compile?. And again - are you sure you have included them the right way?
I guess you meant wtl here.

In the error messages, there are not anythin like First referenced in somefunc(someparam) at the end of the error message? ( Check the build window instead of the task window if you did that before as the build window sometimes contains more info )

thisOne
Posts: 6
Joined: 2004-12-26 13:33

Post by thisOne » 2004-12-28 11:50

hmmm... I'm not sure i have the right ver of libs. I just download them together with dc source and unpack into separate dirs. Output window contain:

Code: Select all

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

zlib - up-to-date.


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

bzip2 - up-to-date.


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

Compiling...
NmdcHub.cpp
client\NmdcHub.cpp(37) : warning C4355: 'this' : used in base member initializer list
Creating library...

Build log was saved at "file://f:\development\DCPlusPlus-0.668-src\vc7\Release\client\BuildLog.htm"
client - 0 error(s), 1 warning(s)


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

Compiling...
MainFrm.cpp
Linking...
UsersFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
WinUtil.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
TransferView.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
TreePropertySheet.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
UCPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
UploadPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
SpyFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
StatsFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
stdafx.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
TextFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
PropertiesDlg.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
PublicHubsFrm.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
QueueFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
SearchFrm.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
main.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
NotepadFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
PrivateFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
FinishedFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
FinishedULFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
GeneralPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
HubFrame.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
DirectoryListingFrm.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
DownloadPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
FavoriteDirsPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
FavoritesFrm.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
ADLSearchFrame.obj : error LNK2019: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ) referenced in function "public: long __thiscall ATL::CComCriticalSection::Init(void)" (?Init@CComCriticalSection@ATL@@QAEJXZ)
Advanced2Page.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
AdvancedPage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
AppearancePage.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
./App/DCPlusPlus.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at "file://f:\development\DCPlusPlus-0.668-src\vc7\Release\windows\BuildLog.htm"
DCPlusPlus - 31 error(s), 0 warning(s)


------ Build started: Project: help, Configuration: Release Win32 ------

Compiling Help File
System nie może odnaleźć określonej ścieżki.//system can't find define directory

Build log was saved at "file://F:\development\DCPlusPlus-0.668-src\vc7\Debug\help\BuildLog.htm"
help - 0 error(s), 0 warning(s)


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

    Build: 4 succeeded, 1 failed, 0 skipped

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

Post by GargoyleMT » 2004-12-28 13:10

Try rebuilding. And perhaps switching from a Release/Debug build to a Debug/Release one (and then rebuilding).

thisOne
Posts: 6
Joined: 2004-12-26 13:33

Post by thisOne » 2004-12-28 14:25

I rebuild it many times and combine with release/debug and almost all available project options. I even try many real stupid things like

Code: Select all

#define _exception_code(void) NULL
or compile and include library with this function doing nothing ;) , yes i know its dumb :oops: , but i really want to make it works.
Any ideas :?:

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-12-28 16:58

Long shot. "unsigned long __cdecl _exception_code(void)" is defined in the file $(VCInstallDir)include\excpt.h.
Do you have have this file? Is it appropriately referenced in Visual Studio?
The world is coming to an end. Please log off.

DC++ Guide | Words

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

Post by Guitarm » 2004-12-28 17:53

Good point TPO :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

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

Post by joakim_tosteberg » 2004-12-29 02:15

If the .h file was missing it wouldn't be able to find the function at all which more probably would result in compile time errors instead of link time. I would rather say that there is some library that should be imported but which isn't.

thisOne
Posts: 6
Joined: 2004-12-26 13:33

Post by thisOne » 2004-12-30 05:45

:lol: :D I already compile my dc :o . If someone is interest how : I defined this function just return;
Maby its not properly but anyway it works. Thanks for help

ullner
Forum Moderator
Posts: 333
Joined: 2004-09-10 11:00
Contact:

Post by ullner » 2004-12-30 09:08

You should not need to add or alter any code when first compiling DC++.

For compiling, you need to:
Include WTL
Include STL
Add natupnp.h (if not allready added) to the includefiles of VS.NET 2003
Have Python installed

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

Post by GargoyleMT » 2004-12-30 13:03

thisOne wrote:Maby its not properly but anyway it works. Thanks for help
If you have any unexplained behavior down the road, this may be why. ;)

Locked