开发者

FreeType manual integration

开发者 https://www.devze.com 2023-01-06 04:41 出处:网络
I am trying to run a program that manually uses FreeType. I should not compile FreeType to a library but use source code directly. At the moment I can compile my code with no errors. However, when I r

I am trying to run a program that manually uses FreeType. I should not compile FreeType to a library but use source code directly. At the moment I can compile my code with no errors. However, when I run my program on Ubuntu it gives a segm开发者_如何转开发entation fault. I believe the problem is related to module structure. I am using FreeType to convert ttf to bitmap, thus I included tt, sfnt, and psnames modules. However, there is something wrong with their initialization I guess.


Why are you avoiding Ubuntu's provided libfreetype6 and libfreetype6-dev packages?

I could understand that you goal might be to make changes to libfreetype, and thus have an easy way to make your needed changes without affecting the rest of the system, but you're always going to want to use FreeType as a library. (Sure, you could statically link against it, but in my experience, statically linking usually adds to problems instead of removing problems.)

So you could install your own local copy of FreeType into /usr/local/lib/ or ~/local/lib/ (use ./configure --prefix=/usr/local or --prefix=~/local/).

Then when compiling your program, you'd use gcc -I ~/local/include -L ~/local/lib ...

0

精彩评论

暂无评论...
验证码 换一张
取 消