wswatson / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

Compilation errors in C++ #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Has this lib been tested in VS C++ environment? I tried to use it ,having all 
kind of weird (mostly language) errors coming from this lib.

Original issue reported on code.google.com by explomas...@gmail.com on 12 Dec 2012 at 7:47

GoogleCodeExporter commented 9 years ago
Could you give some details ?

Some people reported success with compilation on Windows but I'm no specialist. 
One problem may be related to the missing glew.h header.

Original comment by Nicolas.Rougier@gmail.com on 12 Dec 2012 at 7:55

GoogleCodeExporter commented 9 years ago
Well ,that is not related to OpenGL methods.Trust me I am good on this one :) I 
think may be it is because some of your headers have no extern "C" defined?  
can't currently give you exact error output as I removed the project...  it 
would be nice if your repo had a working VS C++ demo project though .Thanks. 

Original comment by explomas...@gmail.com on 12 Dec 2012 at 9:24

GoogleCodeExporter commented 9 years ago
By the way, did you try the main trunk or the gl-3.0 branch ?

Anyway, I intend to fix all pending issues quite soon, hopefully you'll be able 
to compile at that time.

Original comment by Nicolas.Rougier@gmail.com on 12 Dec 2012 at 9:42

GoogleCodeExporter commented 9 years ago
No , I didn't. Btw  I am using GL 4.2 .But I ran compatible mode so that 
shouldn't be a problem.Thanks .

Original comment by explomas...@gmail.com on 12 Dec 2012 at 9:46

GoogleCodeExporter commented 9 years ago
I just checked all the headers and they all test for cplusplus but geenrated 
arial-16.h. Maybe this was the problem.

Original comment by Nicolas.Rougier@gmail.com on 16 Dec 2012 at 9:33

GoogleCodeExporter commented 9 years ago
The problem is probably MSVC not supporting C99 -- or more specifically its 
lack of support for mixed declarations and code. I had to manually go through 
and move declarations/create new scopes as necessary in order for it to 
compile, but once I did, it worked fine.

Original comment by cforf...@gmail.com on 8 Jan 2013 at 8:46

GoogleCodeExporter commented 9 years ago
Or, as pointed out in Issue 34 (which I didn't see before now), one can choose 
to compile it as C++. When doing so it errors out on missing "round", "M_PI", 
"strndup" and "FT_Library_SetLcdFilterWeights". When compiling as C I only got 
an error on M_PI (as I just remembered), and I think 
FT_Library_SetLcdFilterWeights was missing also -- but it still compiled fine.

This is on the GL-3.0-branch.

Original comment by cforf...@gmail.com on 8 Jan 2013 at 9:04

GoogleCodeExporter commented 9 years ago
Thanks. I fixed the M_PI and strnup in the gl-3.0 branch.

For the FT_Library_SetLcdFilterWeights you have to check if you compiled with 
subpixel rendering or not (see issuer 45).

Original comment by Nicolas.Rougier@gmail.com on 4 Feb 2013 at 1:57