Sign in to follow this  
_Sigma

FreeType

Recommended Posts

Has anyone here had any experiance with FreeType 2? I keep recieving "[Linker Error] Unresolved external '_FT_Init_FreeType' referenced from E:\MYDOCS\CHRIS\PROGRAMING\DIRECTX\MERC ENGINE\UNIT1.OBJ" everytime I attempt to use FT_Init_FreeType(). I've checked the doccumentation, but it appears I'm doing everything right... I've included the Include dir, and added the right #includes... Any help would be great! Cheers Sigma

Share this post


Link to post
Share on other sites
You need to link with the library as well.

Simply add the file freetypeproject.lib to your project.

It is usually located in the FreeType source tree under builds/Win32/visualc

Share this post


Link to post
Share on other sites
There are lots of different versions of the library for debug/release, multithreaded/single threaded, linking dll/static libraries etc. Make sure you have the right one.

Share this post


Link to post
Share on other sites
OK, well I definatly DID have the wrong version, and my current version seems right. But I can't find the .lib files. So I can't include them..Does anyone know wehre I can find these?

Cheers

Sigma

Share this post


Link to post
Share on other sites
OK, I tried a different version, the one with the exe setup. I now have the libs as well as the BCB lib(I'm using BCB6)

But I still have the issue.
I've included

//FreeType stuff
#include <ft2build.h>
#include FT_FREETYPE_H


Added
FreeType/lib/libfreetype-bcc.lib to my project

Added
FreeType/include to my include directories

Tried adding FreeType/lib to my lib directories, but that didn't have any effect


What am I missing?

Cheers

Sigma

[Edited by - _Sigma on November 14, 2004 2:30:31 PM]

Share this post


Link to post
Share on other sites
Common! Must I beg? ;)

I tried adding other headers, but that didn't work. I also tried a full rebuild, but alas, that wasn't the cause...

Share this post


Link to post
Share on other sites
This is clearly a linker issue, not so much a freetype one. Perhaps you should change the subject?

btw, BCB? Borland somethingorother?

Share this post


Link to post
Share on other sites
It's been so long and apparently I did not keep notes, but I think I used either mingw32-make.exe or jam(or I bruteforced it-added files manually).
Either way I managed to compile Freetype 2.1.9 into a .lib for my Borland compiler, would you like me to send it to you?
Also, is the inclusion of the Freetype headers within an 'extern "C" {...}' block, cause mine is.

Share this post


Link to post
Share on other sites
>Either way I managed to compile Freetype 2.1.9 into a .lib for my >Borland compiler, would you like me to send it to you?
Yes please!

>Also, is the inclusion of the Freetype headers within an 'extern >"C" {...}' block, cause mine is.

How do I do that again?

extern "C"
{
//FreeType stuff
#include <ft2build.h>
#include FT_FREETYPE_H
}


Like so?

Cheers

Sigma

Share this post


Link to post
Share on other sites
Quote:
Original post by _Sigma
No idea how i would do that.

@C-Junkie: Borland C++ Builder ;)


Freetype is quite easy to build actually.

There are instructions in the Freetype folder, but simply, you just need to pretty much include all of the c files and compile!

There are some toggles you can play with as well, but Free type will compile out of the box.


Another thing, did you try to run the the coff2omf.exe (borland command utility) to transform the .lib file in a format that Borland understand?

Or was it cofftoomf?

Share this post


Link to post
Share on other sites
I got a failure on the e-mail so here's a link.
http://home.earthlink.net/~aaron_ogden/freetype.lib

As far as compiling it yourself, the jam and make files have all the instructions, you just have to learn how to read them.

The extern "C" example you've shown is correct.

Share this post


Link to post
Share on other sites
Well..firstly its Mac! And secondly is OpenGl! :) I know neither!

@RolandofGilead: Have any sample code I could have?

Share this post


Link to post
Share on other sites
Quote:
Original post by _Sigma
Well..firstly its Mac!

It is cross platform.

Quote:
And secondly is OpenGl! :) I know neither!

You don't need to know.

It'll show you how to use Freetype nicely.

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