Freetype not compiling on windows with MinGW

2019-07-28 17:46发布

问题:

I open cygwin and navigate to the freetype-2.5.3 folder I got from the website:

http://www.freetype.org/developer.html

Once I'm there, I run ./configure and it has done 1 of 3 three things so far, seemly at complete random. At first it was saying:

builds/PaxHeaders.3009/detect.mk:1: *** missing separator. Stop.

So, I changed to msys, as is recommended by their site. I run ./configure and it appears to be working. However, it says the target platform is Unix and eventually gets an error saying no suitable C compiler is found.

I then tried to download other versions, some have the same output, some say:

process_begin: CreateProcess(NULL, ver, ...) failed.
builds/PaxHeaders.3009/detect.mk:1: *** missing separator. Stop.

No matter what I've tried( adding MinGW to PATH, adding msys to PATH, running msys with MSYS input, removing sed.exe, running cmake on the CMakeLists, getting different versions of the library, redownloading the library, opening the project with Qt creator ) I always get the same output. It appears to be something wrong with their makefile, but I don't see any evidence of this anywhere on the internet. Thanks for any help.

回答1:

i ran into the same problem and and ended up using a prebuilt version of freetype http://gnuwin32.sourceforge.net/packages/freetype.htm its not 100% up to date but it fits my needs



回答2:

To compile using MinGW do the following:

./configure

make PLATFORM=windows



回答3:

I also ran into the same problem a while ago. I got this error message

    *** missing separator. Stop.

when I downloaded the freetype2.zip version. I checked the detect.mk file with Notepad++ and saw the end of line characters was the windows style ones: CRLF

I used Cygwin which wanted the linux EOL which is LF.

I don't recommend to start converting the files to the linux EOL ones (which Notepad is able to do), but download the *.tar.bz2 or *.tar.gz, which is the correct one for linux.