-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using zlib and freetype static libraries causes LNK2005/LNK4006 #13
Comments
/FORCE:MULTIPLE will only hide the problem. Your application might crash unexpectedly if the wrong function is called. |
It seems to be a bug in the freetype sources when compiling static libraries under Windows. @blackandwhitebg Can you try the libraries in commit 7e8053a ? |
Thank you for your response. (Since using the lib is most likely the preferred way for people who don't want any external dependencies, I would only add a suggestion for future releases to include different libs with /MT and /MD compilations, so whoever wants just a single executable, not depending on anything else at all can use the /MT compilation) |
Hi,
When linking both lib files (freetype.lib and zlib.lib) from a single project, I get errors because parts of zlib are integrated in freetype.lib:
1>zlib.lib(inflate.obj) : warning LNK4006: inflateEnd already defined in freetype.lib(ftgzip.obj); second definition ignored
1>zlib.lib(inflate.obj) : warning LNK4006: inflate already defined in freetype.lib(ftgzip.obj); second definition ignored
1>zlib.lib(inflate.obj) : warning LNK4006: inflateInit2_ already defined in freetype.lib(ftgzip.obj); second definition ignored
1>zlib.lib(inflate.obj) : warning LNK4006: inflateReset2 already defined in freetype.lib(ftgzip.obj); second definition ignored
1>zlib.lib(inflate.obj) : warning LNK4006: inflateReset already defined in freetype.lib(ftgzip.obj); second definition ignored
1>zlib.lib(inflate.obj) : warning LNK4006: inflateResetKeep already defined in freetype.lib(ftgzip.obj); second definition ignored
I found a workaround, which is compiling with /FORCE:MULTIPLE.
Is there a cleaner way to solve the problem?
Thank you
The text was updated successfully, but these errors were encountered: