[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] compilation problems
From: |
Adam Saltsman |
Subject: |
[Freetype] compilation problems |
Date: |
Mon, 06 Jan 2003 21:24:08 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
I'm having a little trouble compiling some code. I downloaded the
pre-compiled win32 binaries, and they had the same problem as compiling
the source natively on my machine. When I try to compile this code:
#include <iostream>
#include <string>
#include <ft2build.h>
#include FT_FREETYPE_H
int main()
{
FT_Library library; //Sets library's handle
FT_Face face; //Sets face's handle
int error = FT_Init_FreeType( &library );
if ( error )
{
cerr << "Error in FT2 lib init" << endl;
exit(0);
}
return 0;
I get this:
C:\code\ISI>g++ -lfreetype -L c:\code\freetype\objs\ font2bitmap.o -o f2b
font2bitmap.o(.text+0x28):font2bitmap.cc: undefined reference to
`FT_Init_FreeType'
collect2: ld returned 1 exit status
The linker appears to be finding the freetype library, but not the
FT_Init_FreeType function. I get the same error if I compile without
the linked library, tho:
C:\code\ISI>g++ font2bitmap.o -o f2b
font2bitmap.o(.text+0x28):font2bitmap.cc: undefined reference to
`FT_Init_FreeType'
collect2: ld returned 1 exit status
I'm compiling in windows XP using the super-cool cygwin stuff. I've had
similar problems with undefined references that were solved by linking
to the library, but even when I compile the library on my system it's
having this error. Any hints/tips? Thanks!
Adam Saltsman
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] compilation problems,
Adam Saltsman <=