PDA

View Full Version : Errors while trying to compile


moydock
06-17-2007, 07:53 PM
I've got the libraries/libs from the wiki, visual c++ 2005 express, Platform SDK w/ the proper changes and i'm trying to compile the source just to see if i can get it working and i'm getting the following error, any help would be much appreciated.

Live.cpp
Generating Code...
Compiling manifest to resources...
Linking...
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_free referenced in function _mysql_ssl_free
mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol _yaSSL_CTX_free
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaSSL_get_cipher_name referenced in function _mysql_get_ssl_cipher@4
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaX509_free referenced in function _ssl_verify_server_cert
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaX509_NAME_oneline referenced in function _ssl_verify_server_cert
mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol _yaX509_NAME_oneline
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaX509_get_subject_name referenced in function _ssl_verify_server_cert
mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol _yaX509_get_subject_name
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol _yaSSL_get_peer_certificate referenced in function _ssl_verify_server_cert
mysqlclient.lib(vio.obj) : error LNK2019: unresolved external symbol _yayaSSL_CleanUp referenced in function _vio_end
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaERR_get_error_line_data referenced in function _report_errors
mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol _yaERR_get_error_line_data
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_read referenced in function _vio_ssl_read
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_write referenced in function _vio_ssl_write
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_shutdown referenced in function _vio_ssl_close
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_free referenced in function _vio_ssl_delete
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_accept referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_set_fd referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_SESSION_set_timeout referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_get_session referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_clear referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_new referenced in function _sslaccept
mysqlclient.lib(viossl.obj) : error LNK2019: unresolved external symbol _yaSSL_connect referenced in function _sslconnect
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaDH_free referenced in function _get_dh512
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaBN_bin2bn referenced in function _get_dh512
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaDH_new referenced in function _get_dh512
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_check_private_key referenced in function _vio_set_cert_stuff
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_use_PrivateKey_file referenced in function _vio_set_cert_stuff
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_use_certificate_file referenced in function _vio_set_cert_stuff
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaX509_get_issuer_name referenced in function _vio_verify_callback
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaX509_STORE_CTX_get_error_depth referenced in function _vio_verify_callback
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaX509_STORE_CTX_get_error referenced in function _vio_verify_callback
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaX509_STORE_CTX_get_current_cert referenced in function _vio_verify_callback
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_load_error_strings referenced in function _check_ssl_init
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaOpenSSL_add_all_algorithms referenced in function _check_ssl_init
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_library_init referenced in function _check_ssl_init
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_set_tmp_dh referenced in function _new_VioSSLFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_set_default_verify_paths referenced in function _new_VioSSLFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_load_verify_locations referenced in function _new_VioSSLFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_set_cipher_list referenced in function _new_VioSSLFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_new referenced in function _new_VioSSLFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_set_verify referenced in function _new_VioSSLConnectorFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaTLSv1_client_method referenced in function _new_VioSSLConnectorFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_set_session_id_context referenced in function _new_VioSSLAcceptorFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaSSL_CTX_sess_set_cache_size referenced in function _new_VioSSLAcceptorFd
mysqlclient.lib(viosslfactories.obj) : error LNK2019: unresolved external symbol _yaTLSv1_server_method referenced in function _new_VioSSLAcceptorFd
../build/ZoneDebug.exe : fatal error LNK1120: 42 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.

moydock
06-18-2007, 05:04 AM
Hrmm, also can anyone who compiles tell me what libraries and contribs you have linked to your project? I get the feeling the wiki is just out dated and that's my problem. Thanks.

uncommon
06-18-2007, 06:07 AM
I think i got this error when i tried to compile against a 5.x mysql lib. You should try using the 4.1.x version.

Darkonig
06-18-2007, 06:39 AM
When you download mysql from dev.mysql.com there are 3 versions of the download available; essentials, zip with installer, zip without installer. Do not download essentials because that is just the binary of the server and you will need the source code if you plan to compile the emu. The windows versions, unlike the linux versions, do not have a separate devel download, so to get the include directories and libraries you must download the full version. Then simply move the include and library directories to your designated library area. Make sure you setup your IDE to look for the includes and libraries in the location you put them.

I use:

c:\dev
|--- \mysql
|--- \include
|--- \lib
|--- \zlib123-dll
|--- \include
|--- \lib

moydock
06-18-2007, 07:23 AM
I'm using 5.0, is that really the prob? I'd think a later version would be better... I 'll give it a try though.

Yeah I figured that out the hard way yesterday Darkonig, I actually had that error and figured out i didn't have those directories... I'm amazed i've gotten this far tbh... lol, i'll try the lower version, i really can't think what else it could be i've done everything according to the wiki.

moydock
06-18-2007, 07:38 AM
4.1 didn't work. Any other ideas?

Darkonig
06-18-2007, 08:34 AM
i wasn't saying use lower version. I'm using mysql 5.0.41 with no problems. Just make sure you have everything configured correctly not counting the emu project. IE. make sure all of your required includes and libraries (zlib, mysql, perl) are in appropriate places, that you have the include path and library path in the compiler set to those places, and that you don't have any conflicting paths that would select a different version.

Getting visual studio 2005 setup correctly was the biggest challenge in compiling the emu. There is a good guide to getting it setup correctly in the wiki. The only thing it does not cover is getting your hands on the mysql includes and libraries which is what i was describing above.

When i said 3 versions of the download are available, I meant 3 versions of 5.0.41, one is 27mb and only include binarys, the other two are around 57mb and include source. These 3 versions of the download are available regardless of which version of the database you select. It is confusing use of the word version but that's what they call it on the site so.

moydock
06-18-2007, 08:40 AM
Yeah i've checked and re-checked and rerechecked :P Followed the wiki to get to this point. Only thing i can think is the wiki is missing some paths or something.

Darkonig
06-18-2007, 08:42 AM
Reading closer though your error list above, that is a link error rather than a compile error. This would suggest that the path to the includes and libraries are not pointing to the same version. When you download the package mentioned above make sure your include path and your library path in the compiler both point to the items from that download and that you remove any conflicting paths that you may have already configured.

Darkonig
06-18-2007, 08:50 AM
Ok, the configuration changes I made to compile the emu were:

Include files:
c:\perl\lib\CORE
c:\dev\zlib123-dll\include
c:\dev\mysql\include

Library files:
c:\perl\lib\CORE
c:\dev\zlib123-dll\lib
c:\dev\mysql\lib\opt

moydock
06-18-2007, 09:02 AM
Yeah just checked again, all good. Even tried being case sensitive.

Okay let me make sure i'm building it correctly. I go:

File-->Open-->Project/solution--> Open zone folder, open the figure 8-looking zone file.

Build-->Build Zone

and then it prints out the error...

moydock
06-18-2007, 09:11 AM
I'm also getting a bunch of errors like this before that one while building if you can make any sense of it.

EQEMuError.cpp
..\common\EQEMuError.cpp(93) : warning C4996: 'strcpy' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(73) : see declaration of 'strcpy'
Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
..\common\EQEMuError.cpp(134) : warning C4996: 'getch' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\conio.h(145) : see declaration of 'getch'
Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.'

moydock
06-18-2007, 09:30 AM
Also, it shows this in the error log thing:

".\AA.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Slowdex\Desktop\EQEmu-0.7.0-992\Build\Zone\Debug\RSP00000523923948.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\Slowdex\Desktop\EQEmu-0.7.0-992\Build\Zone\Debug\TMP00000623923948.tmp" with contents
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "..\\Build\\Zone\\Debug\\ZoneDebug.exe.embed.manife st"
]
Creating command line "rc.exe /fo"..\Build\Zone\Debug\ZoneDebug.exe.embed.manifest.r es" "c:\Documents and Settings\Slowdex\Desktop\EQEmu-0.7.0-992\Build\Zone\Debug\TMP00000623923948.tmp""
Creating temporary file "c:\Documents and Settings\Slowdex\Desktop\EQEmu-0.7.0-992\Build\Zone\Debug\RSP00000723923948.rsp" with contents
[
/OUT:"../build/ZoneDebug.exe" /INCREMENTAL /LIBPATH:"c:\mysql\lib\opt" /LIBPATH:"c:\eqemu\lib" /MANIFEST /MANIFESTFILE:".\../Build/Zone/Debug\ZoneDebug.exe.intermediate.manifest" /NODEFAULTLIB:"LIBCMT" /NODEFAULTLIB:"LIBC" /DEBUG /PDB:".\../build/ZoneDebug.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib

/OUT:"../build/ZoneDebug.exe" /INCREMENTAL /LIBPATH:"c:\mysql\lib\opt" /LIBPATH:"c:\eqemu\lib"

Where is it getting c:\eqemu\lib? There is no lib folder in eqemu... I didn't set that path.

Darkonig
06-18-2007, 10:13 AM
When I do the build, i would go into EQEmu-0.7.0-992 and open the server.sln file in there as the solution. It contains subprojects of emusharemem, world, and zone. This will build all 3 projects. There are dependencies between them.

moydock
06-18-2007, 11:46 AM
Well eqemumemshare is successful like that however the other 2 fail.

moydock
06-19-2007, 12:25 PM
Aparently it's a bug w/ mysql. http://bugs.mysql.com/bug.php?id=27861

My lyfe........

image
06-19-2007, 12:54 PM
The first set of errors your getting related to mysql is because you didnt include the mysqlclient.lib to the project. You need to find the mysqlclient.lib file (its in the Mysql/lib directory/opt).

So when you have visual studio.net open click on the Project menu, add existing item, set files of type to all files and get to the directory that has the mysqlclient.lib and include it.

If you got any other errors after doing it, paste them all.

moydock
06-19-2007, 02:29 PM
No worky, same error. I included the folder in the options, not sure if that's the same thing.

image
06-19-2007, 02:31 PM
You tried using mysql version 4.x? Because they are right, 5.x isn't compatible, its a completely different schema. And when you use 4.x you only need to include the mysqlclient.lib to the project.

moydock
06-19-2007, 04:11 PM
Yeah, that doesn't work either, i'm guessing it's just that bug I linked to. Although it doesn't make sense why other ppl aren't having issues.

image
06-19-2007, 05:33 PM
You need to completely remove the 5.x version from your system, you should not be getting the same errors because this bug only affects 5.x

Darkonig
06-20-2007, 12:09 AM
Actually, when I first setup and compiled this project, I used mysql 5.0.27 source as that was the most current at the time. I compiled it just fine. When I was setting up my nephew, i downloaded 5.0.41 for him to use and copied my emulator database and emulator server binaries to his system, used grant to give him access to the database, and it ran fine on his system. I haven't actually tried compiling it with 5.0.41 source.

moydock
06-20-2007, 07:34 AM
Alright, gonna try uninstalling both and reinstalling, will post results.

moydock
06-20-2007, 08:22 AM
Holy fuck it worked. You are the shit image. Ty so much and ty everyone else for the help :).

So to recap for future ppl with this problem,

FIX: Uninstall mysql 5.x completely and install Mysql 4.1.

image
06-20-2007, 11:26 AM
Glad to hear it, enjoy the rat nest that is EQEMu :)

Yohkoh
08-22-2007, 05:15 AM
I was having the same errors. Been running MySQL 5.0.37 with my own EQemu server since June. Instead of uninstalling and re-installing MySQL, I downloaded the source for 4.1.22 and compiled just mysqlclient for the mysqlclient.lib file. EQemu now compiles with no errors now.

Thanks for this post or I would have been lost. :)

moydock
08-22-2007, 08:55 AM
Glad it helped someone else :) I very nearly gave up on it, took me like 18 hours total i think trying to get it working.

Congdar
02-18-2008, 01:25 PM
I had this same compile issue with mysql 5.0.41 so I just installed 5.0.51 over the top and it compiles fine now.

mattmeck
02-18-2008, 06:36 PM
I had this same compile issue with mysql 5.0.41 so I just installed 5.0.51 over the top and it compiles fine now.

Old 08-22-2007, 05:55 PM

You necro you

Congdar
02-19-2008, 02:14 AM
Adding good info to old threads is a good thing for people who use search. No need for people to go back to version 4 (even though that seemed to work for this guy), upgrade instead of downgrade to fix this compile issue.

spider661
03-22-2008, 11:56 AM
i hate to bring up an old topic but i cant find anything else.

i decided to try my hand at working with a server but i wanted to get the source code in case i wanted to make changed to the code itself (or if i found fixes that haven't been implanted yet.) so i go to the wiki and read all the stuff there and i set up vs 2005 express as described to the letter. then after gettign errors i did everything sayed to do here. but im still getting errors and i dont understand whats wrong. here is th output when i tell it to build

code was here but sayed it was to long a post so ill post the output on the next post.


as you can see im getting errors like
..\common\patches\patches.cpp(7) : fatal error C1083: Cannot open include file: 'Anniversary.h':
and lots and lots of warnings.
also when running it for the first time it had to convert it because it was made using an older version then i had im guessing if i read the message right..

anyways sorry for such a long post but an kinda help would be useful..\

also I don't know if it matters but ill say it just in case, i used tortoise cvs rather then SmartCVS like it sayed to use in the wiki with :pserver:anonymous@eqemulator.cvs.sourceforge.net:/cvsroot/eqemulator
as the cvs root and no other settings changed. just incase that matters and im getting the wrong vers mabie?

anyways what you guy think?

spider661
03-22-2008, 12:04 PM
Way to long to post so here is a link to it (the output log that is) (http://piratescoastalparadise.com/test/log.txt)

spider661
03-22-2008, 01:44 PM
well it seems the cvs was missing some files so i downloaded the file off the site then compiled that and that fixed the problem BUT i still get errors saying
LINK : fatal error LNK1104: cannot open file 'perl58.lib'
i looked in the perl\lib\CORE folder its not there seems they changed it recently im guessing the only file there even close is named perl510.lib..

so now what?