开发者

Can I use Win32 FreeType without the .dll file?

I'm teaching myself OpenGL and I'm implementing ttf text rendering using FreeType 2. I downloaded the library f开发者_如何学Crom

http://gnuwin32.sourceforge.net/packages/freetype.htm

and after a couple of minor issues I got it running properly. The thing that's bothering me is that I have to place a copy of freetype6.dll in the directory with my executable in order for the thing to run. I generally try to avoid a bunch of unnecessary dll files floating around. I'm sort of new to windows programming, but from what I understand most libraries can be built to run fully from a lib rather than requiring a dll at runtime. Looking through the documentation from FT is making my brain melt, so I thought I would ask here to see if there were any devs that have worked with FT before and if so, do they know how to build the library such that no dll is required at runtime.

Thank you in advance for any advice or support.


Check out this link. See the section Optional: Installing FreeType (by compiling it yourself)

Follow the instructions and you'll be good to go.


you can generate static lib by getting source code of it... then you won't need dll...and i think freetype2's source is available...


It is something DLL generic. All your DLLs should be in PATH similarly to LD_LIBRARY_PATH. Also under Windows (unlike Unix) the current directory is always in the PATH. So you just need to set your PATH variable to point to location of this dll.

Now, for Unix... you probably just have this library installed by default like hundreds of other useful libraries that are not present under Windows by default.

So... No unless you link statically you should use DLL somehow. And my suggestion - use dll.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜