Sign in to follow this  
soconne

FreeType2 unresolved external errors

Recommended Posts

soconne    105
I have the full source for FreeType 2.3.5 and I've compiled it into a .lib file in Visual Studio. I then import the .lib file into my application but when I compile I get the following errors: Error 17 error LNK2001: unresolved external symbol __imp__FT_Done_Memory freetype235.lib Error 22 error LNK2001: unresolved external symbol __imp__FT_Matrix_Invert freetype235.lib Error 21 error LNK2001: unresolved external symbol __imp__FT_Matrix_Multiply freetype235.lib Error 18 error LNK2001: unresolved external symbol __imp__FT_New_Memory freetype235.lib Error 16 error LNK2001: unresolved external symbol __imp__FT_Stream_Open freetype235.lib Error 20 error LNK2001: unresolved external symbol __imp__FT_Stream_OpenGzip freetype235.lib Error 19 error LNK2001: unresolved external symbol __imp__FT_Stream_OpenLZW freetype235.lib Does anybody know what's wrong?

Share this post


Link to post
Share on other sites
soconne    105
Well there's nothing special. I'm including the regular headers and importing the library using #pragma.

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H

#pragma comment(lib, "freetype235.lib")

Share this post


Link to post
Share on other sites
sigsegv42    158
I'm using freetype2 in my projects without any linking errors. However, there are two things I'm doing differently. 1 - specifying the library in the project linker settings instead of using #pragma. 2 - building and linking against the MT freetype targets.

Do you have the correct library include directory configured in your project also? (e.g. "C:\freetype-2.3.5\objs\")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this