|
From: | Parth Wazurkar |
Subject: | Re: [ft-devel] [Doubt] Error with STREAM_FILE function. |
Date: | Wed, 13 Jun 2018 15:52:34 +0530 |
>> Actually I want to extract the file pointer from the input stream.
>> For this I initially used (FILE*)stream->descriptor.pointer to get >Don't use FreeType internals outside of the library. Look into the
>> the pointer but it did not allocate the pointer and gave a
>> segmentation fault with fseek.
>FreeType demo file `src/ftcommon.c' for an example of file handling.
>> I then did an explicit fopen on the filename later and my code ran
>> properly.
>This sounds like the right solution.
>> Now the problem is that I cannot extract file pointer from the
>> stream.
>Why do you need it? What problem do you want to solve?
> Also, if STREAM_FILE is already defined to be used to ease the
> process, then why is it showing undefined symbol?
>Again: It is a macro, only *locally* defined (in `ftsystem.c'). If
>you use it in another file, the compiler treats it as an undefined
>symbol.
[Prev in Thread] | Current Thread | [Next in Thread] |