tcoppex / ofxFontSampler

:ab: TrueType font glyph sampler addon for OpenFrameworks.
MIT License
3 stars 1 forks source link

errors in Windows #2

Closed moebiussurfing closed 2 years ago

moebiussurfing commented 3 years ago

hey @tcoppex , are you using another ofxTriangleMesh fork? I am getting the linked fork on the README... This is on Visual Studio 2017, OF 0.10

Severity    Code    Description Project File    Line    Suppression State
Error (active)  E0135   class "ofxTriangleMesh" has no member "drawCleanVoronoi"    example F:\openFrameworks\addons\ofxFontSampler\example\src\ofApp.cpp   151 
Error   C2660   'ofxTriangleMesh::draw': function does not take 1 arguments example f:\openframeworks\addons\ofxfontsampler\example\src\ofapp.cpp   137 
Error   C2039   'drawCleanVoronoi': is not a member of 'ofxTriangleMesh'    example f:\openframeworks\addons\ofxfontsampler\example\src\ofapp.cpp   151 
Error   C2429   language feature 'init-statements in if/switch' requires compiler flag '/std:c++17' example f:\openframeworks\addons\ofxfontsampler\src\ofxfontrenderer.cpp 25  
tcoppex commented 3 years ago

Yes I totally did O_O", I forget old commits I have not pushed at the time. I just updated the ofxTriangleMesh repository, it should work now.

Thanks for the feedback :+1:

moebiussurfing commented 2 years ago

hey @tcoppex ,

Trying to make it work on Windows again.. I changed the VS project settings to enable c++ 17, but I am having errors on OF side:

Severity    Code    Description Project File    Line    Suppression State
Error   C2757   'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file ..\..\..\addons\ofxFontSampler\src\ofxFontSampler.cpp)   example c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\fstream 24  
Error   C2757   'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file ..\..\..\addons\ofxFontSampler\src\ofxFontRenderer.cpp)  example c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\fstream 24  
...

There's some error on triangulateConstrainedDelaunay method:

      // Triangulate & generate Voronoi diagram for the glyph.
      {
        auto &mesh = glyph_mesh->face;
        mesh.triangulateConstrainedDelaunay(polygon_, 24, 620); 
        mesh.generateVoronoiDiagram();
      }

could you or do you know how to remove the c++17 parts to the more "OF standard" c++14?

I found some info about how to switch an OF project to c++ 17 but is not trivial: https://github.com/openframeworks/openFrameworks/issues/6585

Regards.

tcoppex commented 2 years ago

Hi @moebiussurfing,

You're right about C++17 code on OpenFrameworks libraries, this project was compiled with gcc 7.5.0 and c++14 though, so this might be on the MSVC side of things as regardings filesystem neither the library nor its keyword is used in the project (or ofxTriangleMesh). I'll take a look when I have a moment, thanks for the head-up.

tcoppex commented 2 years ago

I believe https://github.com/openframeworks/openFrameworks/issues/6832 is related so I close the issue.