1

First off, allow me to give you some background. I'm attempting to emulate a game from my childhood. A lot of work has been done with respect to emulating said game, and I've made some decent progress through the windows setup guide that can be found here. I recommend taking a look at that first, because knowing the prior steps I've done will probably help in answering this.

Currently I'm on step 10, building the Vana solution. When I build it in Visual Studio 2019, I encounter 3 errors. The login, channel, and world server projects cannot open “libmysql.lib”. The output is as follows:

LINK : fatal error LNK1104: cannot open file 'libmysql.lib'

And under the error list it reads:

LNK1104 cannot open file 'libmysql.lib'

It’s not telling me why it cannot open it, it just says that it can’t open it. It’s not giving me any location, or much clues as to what exactly I should do. I found “libmysql.lib” within the MySQL server community 8 folder and I put the file within the SQL folder in the “LazurBeemz” directory, but got the same error.

I then tried putting it into the MySQL server 5.0 folder because that’s where I pointed the “LazurBeemz” pack to, unfortunately I got the same exact errors. Honestly I have no idea where exactly I should put it or why I’m getting these errors. It’s beyond me. I checked the specifics of the error code (LNK1104), and it has a PLETHORA of possibilities. The main thing I need to know is WHERE should this file go?

Any Thoughts?

Here is a picture of the error messages

Harry Flores
  • 41
  • 2
  • 4
  • 1
    The error is most likely one or more of the following 3 things: 1. The library is not in any of the folders listed in your linker->general->additional library directories setting for your project, 2. You are mixing 32 and 64 bit, or 3. The library file is corrupt. – drescherjm Aug 03 '20 at 15:15
  • @drescherjm Thanks for the help! So I've traveled to the linker->general->additional library directories setting. It has it as this: $(MySqlDirectory32)\lib;$(Configuration)_VC$(PlatformToolsetVersion)\Common;$(LazurBeemz)\$(PlatformToolsetVersion)\lib\$(Configuration);%(AdditionalLibraryDirectories) How do I find this? I can't seem to find this location on my computer. I've never seen a directory with dollar signs ($) and such. I've searched both of my drives and it came up empty handed. – Harry Flores Aug 03 '20 at 15:46
  • That means you have not added the location of `libmysql.lib` to this list. You need to do that. – drescherjm Aug 03 '20 at 16:41
  • ***I've never seen a directory with dollar signs ($) and such*** Those are variables that are available in visual studio that help you with projects. Your library will not be in any of these locations and you should not try to put it there. These locations are for the system files. – drescherjm Aug 03 '20 at 16:42
  • @HarryFlores `$(MySqlDirectory32)\lib` This sounds like where where `libmysql.lib` is supposed to be, but you probably don't have the `MySqlDirectory32` build variable configured. Easiest way to set it up would be to define an environment variable `MySqlDirectory32` pointing to the actual directory where you have it. Or, simply replace `$(MySqlDirectory32)\lib` with the actual directory, though you will have to do that in all places where the project references it. – dxiv Aug 04 '20 at 02:32

1 Answers1

2

First, you need to find out the file directory where the libmysql.lib is located.

Then, you could select Properties->Linker->General->Additional Library Directories-><Edit...> and add libmysql.lib file storage directory.

enter image description here

Finally, you could select Properties->Linker->Input->Additional Dependencies and add the name of libmysql.lib.

enter image description here

Note: You need to perform similar operations on debug version and release version.

Barrnet Chou
  • 1,738
  • 1
  • 4
  • 7