Unresolved externals __imp__........

Questions or HOWTOs about the above? Post 'em here...
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Unresolved externals __imp__........

Post by dusti »

Hi

I'm trying to compile BZFlag with Visual C++ 2005 Express edition. I normaly don't work with Visual C++. I got the IDE to compile the code, but it fails when it should link the files with the following error messages:
2>------ Erstellen gestartet: Projekt: bzflag, Konfiguration: Debug Win32 ------
2>Linking...
2>geometry.lib(PolyWallSceneNode.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
2>net.lib(multicast.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
Many error messages following (about 200), just the last word of the external smbols changed.
I found a messaging programm on the net, called Internet Messaging Program (imp). Does BZFlag needs that imp? Or is this a pure coincidence?
It would be great if someone could help me to solve this problem.

dusti
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

__imp__ means it is an imported symbol. I haven't written a Windows program since Visual Studio C++ 5.0 so I won't be of much help. But the linker is failing to find the symbol __imp___CrtDbgReportW

You may need to add a library directory.
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I added already all the stuff with curl and SDL. Which librarys do you think i have to link too? I read somewhere that i just have to add the curl and SDl stuff. or is this my mistake?
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Read the README.WINDOWS file in the bzflag source root directory. It tells you what you need to know about requirements.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

My computer fulfils the requirements. I installed:
Platform SDK
DirectX SDK
libCurl
SDL
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

You might try building a release version. I say this because the missing symbol appears to be a debug symbol. Maybe something with the C runtime debug library. If you are trying to build the development version of BZFlag it may be that version. Occasionally the build gets broken. If you are, try a stable version like 2.0.12. You could also get on the bzflag IRC and try to get help there.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

widows builds with visual C++ do not use SDL

did you add the paths to the libs to Visual C++ in addition to just installing them. That looks like a platform SDK lib that it can't find )
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

Thank you. I could reduce the error messages to 15. I didn't knew that i had to add additional library dependencies. For ohters who have the same problem: You have to add these libs to the library dependencies:
dinput.lib
dxguid.lib
ws2_32.lib
dsound.lib
winmm.lib
shell32.lib
user32.lib
advapi32.lib
glu32.lib
opengl32.lib
Gdi32.lib
libcurl.lib
ATM i get these errors:
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function "public: __thiscall cURLManager::cURLManager(void)" (??0cURLManager@@QAE@XZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function "public: __thiscall cURLManager::cURLManager(void)" (??0cURLManager@@QAE@XZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function "public: virtual __thiscall cURLManager::~cURLManager(void)" (??1cURLManager@@UAE@XZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_init referenced in function "private: static void __cdecl cURLManager::setup(void)" (?setup@cURLManager@@CAXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_global_init referenced in function "private: static void __cdecl cURLManager::setup(void)" (?setup@cURLManager@@CAXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_version referenced in function "private: static void __cdecl cURLManager::setup(void)" (?setup@cURLManager@@CAXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_add_handle referenced in function "public: void __thiscall cURLManager::addHandle(void)" (?addHandle@cURLManager@@QAEXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_remove_handle referenced in function "public: void __thiscall cURLManager::removeHandle(void)" (?removeHandle@cURLManager@@QAEXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function "public: void __thiscall cURLManager::performWait(void)" (?performWait@cURLManager@@QAEXXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_fdset referenced in function "public: static int __cdecl cURLManager::fdset(struct fd_set &,struct fd_set &)" (?fdset@cURLManager@@SAHAAUfd_set@@0@Z)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_info_read referenced in function "public: static bool __cdecl cURLManager::perform(void)" (?perform@cURLManager@@SA_NXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_multi_perform referenced in function "public: static bool __cdecl cURLManager::perform(void)" (?perform@cURLManager@@SA_NXZ)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_formfree referenced in function "private: void __thiscall cURLManager::infoComplete(enum CURLcode)" (?infoComplete@cURLManager@@AAEXW4CURLcode@@@Z)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_getinfo referenced in function "public: bool __thiscall cURLManager::getFileTime(__int64 &)" (?getFileTime@cURLManager@@QAE_NAA_J@Z)
1>common.lib(cURLManager.obj) : error LNK2019: unresolved external symbol __imp__curl_formadd referenced in function "public: void __thiscall cURLManager::addFormData(char const *,char const *)" (?addFormData@cURLManager@@QAEXPBD0@Z)
1>..\..\src\bzflag\debug\bzflag.exe : fatal error LNK1120: 15 unresolved externals
That are only from libcurl, but i don't know what to do. I added the right paths to include, lib and bin, but the errors still occur. Can someone help me?
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I still have these errors. No one around who can help me?
User avatar
blast
General
General
Posts: 4934
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

Are you sure you have the libcurl library file in a location that Visual C++ is set to look?
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

Yes. I tried various variations (but none works), i downloaded different versions of libcurl, tried dozens of combinations of paths and libs.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

what exactly did you download for libCURL?
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

In the bzflag docs is a "link" to http://curl.haxx.se/libcurl/. On this page is a downloadlink to http://curl.haxx.se/download.html I downloaded from that page the package named "Win32 - MSVC" for windows32 without SSL. But i also tried a binary and devel-version.
User avatar
blast
General
General
Posts: 4934
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

Try building your own libcurl from source.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

the file libcurl-7.18.0-win32-msvc.zip should work fine, make sure that the libcurl.lib is in your LIBRARIES PATH not your INCLUDE path in visual C++
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I played around and suddenly it worked fine. I don't know what i did, but thanks to you, who tried to help me!
I've now got another error i can't handle with. After bzflag is launched, an error message appears who says:
"Die Ordinalszahl 55 wurde in der DLL "zlib1.dll" nicht gefunden" ("The ordinal number 55 wasn't found in zlib.dll"). I searched the web and found a thread in this forum (http://my.bzflag.org/bb/viewtopic.php?t ... 4e6bb7796e) but its not helpfull because he don't say how he fixed the problem and the download link doenst work.
Does someone know how to fix this problem?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you need the binary zlib dll. the binary libCURL dll wants it. Just get the current binary zlib.

or just grab the libcurl dll from one of our bzflag installers, it doesn't need zlib.
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

Thank you, copying the dll from the official bzflag worked.
I've now another error message which says that no fonts were found. I searched and found, that i had to copy the data-directory to the folder in which the bzflag.exe is. But the error still occurs. Is there another way to fix the problem.
Thank you very much that you helped me so long so acquiescent :wink:
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you'll notice that we copy a bzflag.exe to the root level of the source tree (where data is )

you should set up your project to debug THAT exe not the one in the debug folder.

Be sure to set the working dir to the source root too.
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I don't know exactly how to set up my project to debug the exe in the root folder. I changed the property "Command" in the "Debugging" pnael in the bzflag propertys. Is that correct? Because that don't work right, i still get the font error.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

yes, but you must also set the working dir to point to the root folder
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I did that, but the error still occurs. I set the Command Property to "C:\Users\MyName\Documents\Bzflag Dev\bzflag-2.0.10\bzflag-2.0.10\bzflag.exe" and the working dir to "C:\Users\MyName\Documents\Bzflag Dev\bzflag-2.0.10\bzflag-2.0.10".
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

make sure that you have the data dir in it's original location, and didn't MOVE it to the debug folder.
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I'm sure i've just one data folder and he is in the root folder (on the same level as the bzflag.exe and all the other folders like debian, dev-C++, package, plugins, scr, tools and win32).
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

then if it all is setup correctly it should work.

other then that I do not know what to tell you.
ImageJeffM
Post Reply