Linking GLFW with /MT

jonathanhook wrote on Sunday, June 05, 2011:

Hi everyone,

I am trying to link a release build of a project that uses GLFW in VS2010
using the multi-threaded run-time libs (/MT). I’m getting various LNK2005
errors, so somewhere I assume something isn’t linked against /MT. All the
other code I’m linking against I’ve compiled myself using /MT (I’ve double-
double checked!). I’m just using the standard glfw build

The weird thing is, I’m sure I’ve compiled this whole project (including
GLFW) under /MT. Therefore I was wondering if anyone could confirm whether
GLFW will compile with /MT (as opposed to /MD/MTd etc…) or if anyone else
has had similar problems? Hopefully then I can discount GLFW being the problem
and find what else is wrong!!

Thanks for your help in advance.


elmindreda wrote on Sunday, June 05, 2011:

There are various issues with the binary package. The safest choice is to
download the source package and build GLFW yourself with appropriate settings.
This way, you can make sure that everything matches.

plmrdoompl wrote on Monday, October 10, 2011:

So I’ve tried that and I get crt0dat.c errors. Is that too covered by building
own glfw library? If so, it’s not helping.