List:General Discussion« Previous MessageNext Message »
From:Lars Nilsson Date:June 19 2012 5:18pm
Subject:Re: Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 Express
View as plain text  
On Tue, Jun 19, 2012 at 11:56 AM, Miguel Cardenas <renito73@stripped> wrote:
> RELEASE:
> - Runtime: /MT (static threaded)
> - Library: mysqlclient.lib (...\mysql\lib)
> - Ignore library: LIBCMTD.lib (without this does not link the release)
> - Debug: NO
>
> RELEASE:
> - Runtime: /MTd (static threaded debug)
> - Library: mysqlclient.lib (...\mysql\lib\debug)
> - Ignore library: <empty> (now allowed LIBCMTD.lib or does not link the debug)
> - Debug: YES
>
> If I try to use /MD or /MDd does not compile, if it works with /MT(d)
> will leave it that way XD
>
> I'm going to test the debug version (one thing is that compiled and
> another one that works =) and if get stuck again will post it...
>
> Thanks for your response
>
> P.D. One last question, is it right to use "...\mysql\lib\debug"
> directory for debug version? or it should be set to ""...\mysql\lib"
> in both cases and the linker chooses the right one? If compiling in
> debug mode it works with both "...\mysql\lib" and
> "...\mysql\lib\debug" in DEBUG mode... maybe running the debugger will
> not work with the lib, still have to test, but at least it compiles
> with no errors... can you comment something about this?

In general, you'd want to ensure every object file and static library
linked into your program is compiled with the same runtime library
selected /MT[d] or /MD[d], to ensure a proper working environment. If
you were to link with libmysql.lib you'd avoid having to match up
these flags for this particular library for your own code. Mixing and
matching these flags among things linked into a executable or dll is a
recipe for a headache on Windows.

Regarding your question about the directory, you'd more than likely
want to link with the one in the debug directory, I think, to get
useful stack traces into library code when debugging.

Lars Nilsson
Thread
Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 ExpressMiguel Cardenas19 Jun
  • Re: Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 ExpressLars Nilsson19 Jun
    • Re: Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 ExpressMiguel Cardenas19 Jun
      • Re: Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 ExpressLars Nilsson19 Jun
RE: Unresolved symbols with mysqlclient in DEBUG mode using VC++2010 ExpressMartin Gainty19 Jun
  • Re: Unresolved symbols with mysqlclient in DEBUG mode using VC++ 2010 ExpressLars Nilsson19 Jun