MySQL Embedded - Getting started with libmysqld. In the Embedded subdirectory, both debug and release versions are available, and in DLL and static builds.
My project is running fine, but its requirement for some DLLs means it cannot be simply dragged and dropped by the end user. The DLLs are not loaded when put side by side with my executable, because my executable is not an application, and its location is not in the few locations where Windows looks for DLL. I already asked a question about how to make their loading happen. None of the suggestions worked (see the question at ) So I am now exploring another way: get rid of the DLLs altogether, and link with static versions of them. This is failing for the last of those DLLs. So I am at this point where all but one of the libraries are statically linked, and everything is fine. The last library is the standard C library for mySQL, aka Connector/C. Emulyator hasp klyucha 1s 83.
The problem I have may or may not be related with that origin. Whenever I switched to the static library in the linker additional dependency, I get the following errors (log at the end): 1- about 40 duplicate symbols (e.g. _toupper) mutually between LIBCMT.lib and MSVCRT.lib. Interestingly, I can't control the inclusion of these two libraries: they are from Visual Studio and automatically included. So why are these symbol duplicate when I include mySQL's static lib, but not its DLL? Well, writing up my question led me to a solution.
The key was the two lines: LINK: warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library LINK: warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library I found the 'Ignore specific library' in the input part of the linker section of the project properties. Adding LIBCMT there, and only that one, fixed everything. What happened to that _main symbol? But it works.