Jump to content
  • Advertisement
Sign in to follow this  
polarboy

What's the linker option for freetype2

This topic is 3582 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I just picked up my project again, however, since this is a new system, I lost the old data I had on my code::blocks editor. My code compiled and everything and now I'm gettng errors such as undefined reference to `_FT_Init_FreeType'| I think that's because I didn't link freetype2, I tried to google for it, with no luck, I remember seeing it before, that's how I got freetype2 working...but now....I can't seem to find it. Anyone care to tell me? Also, I don't really understand think linker thing, anyone know any short and sweet articles that explains it? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
You should link with -lfreetype

Codeblocks has a gui from which you can specify libraries to link. Right click your project, select "Build options" and then the "Linker settings" tab. Just click 'add' and select the apropriate library

Share this post


Link to post
Share on other sites
Thanks for the answer, actually found an old project that would compile for me properly that uses SDL OpenGL and freetype, can't find any settings there though

under linker option, everything is empty, yet, it still links with freetype and SDL and everything. Is ther a way that I can see these "hidden" options?

Now I'm getting undefined reference to things like
glGenTextures
glBindTexture

and other openGL stuff

while all the SDL stuff are fine, do I need to get the glux dll and link that to my project as well?

Share this post


Link to post
Share on other sites
By "glux dll" did you mean glaux? or something else? maybe glu?
There shouldn't be any 'hidden options' there. One possibility is that they're set under global preferences, but that's most unlikely
Open up the linker settings tab for your project again and, on the right side text field, type these:

-lmingw32
-lSDLmain
-lSDL
-lopengl32
-lglu32
-lfreetype


These should fix your 'undefined reference' errors

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!