From: Rodrigo H. <kw...@ae...> - 2005-06-03 20:01:20
|
Hello All, I built and installed FreeType 2.1.9 using the mingwPORT script, it went fine, but when trying to detect the library in my project, the test fails, I just added whats in freetype2.m4 to my acinclude.m4 file, so it should work (worked before for me using a static build). The configure script fails linking the conftest.c file with the following output: configure:17635: checking for FreeType -- version >= 2.1.9 configure:17721: gcc -o conftest.exe -g -O2 -Ic:/MinGW/include/freetype2 -Ic:/MinGW/include conftest.c -Lc:/MinGW/lib -Wl,--rpath -Wl,c:/MinGW/lib -lfreetype >&5 c:/winnt/temp/ccMTbaaa.o(.text+0x1f): In function `main': c:/stuff/glitch/conftest.c:39: undefined reference to `FT_Init_FreeType' c:/winnt/temp/ccMTbaaa.o(.text+0x37):c:/stuff/glitch/conftest.c:45: undefined reference to `FT_Done_FreeType' collect2: ld returned 1 exit status configure:17724: $? = 1 configure: program exited with status 1 I have checked and the libfreetype-6.dll does contain the functions unmangled, the functions apear on the .a files as well, though with a "_" prepended (stdcall?), so in theory, it should all work out, but it doesnt. I have taken the conftest.c file out of the output and tried to manually compile it, I get the same error, here is conftest.c: -----------------------------conftest.c-------------------------------- #define PACKAGE_NAME "Glitch" #define PACKAGE_TARNAME "glitch" #define PACKAGE_VERSION "0.1.0" #define PACKAGE_STRING "Glitch 0.1.0" #define PACKAGE_BUGREPORT "kwizatz@-no-spam-aeongames.com" #define PACKAGE "glitch" #define VERSION "0.1.0" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #ifdef __cplusplus extern "C" void std::exit (int) throw (); using std::exit; #endif #define SO_EXT ".dll" /* end confdefs.h. */ #include <ft2build.h> #include FT_FREETYPE_H #include <stdio.h> #include <stdlib.h> int main() { FT_Library library; FT_Error error; error = FT_Init_FreeType(&library); if (error) return 1; else { FT_Done_FreeType(library); return 0; } } -----------------------------conftest.c-------------------------------- The way gcc command to link it is: gcc -o conftest.exe -g -O2 -Ic:/MinGW/include/freetype2 -I/MinGW/include conftest.c -L/MinGW/lib -Wl,--rpath -Wl,/MinGW/lib -lfreetype Am I missing something, or is this a bug. Oh and I am using GCC: 3.4.2, and the latest automake, autoconf, libtool and MSYS snapshot. Thanks |