ofxDatGui compilation errors on Windows Visual Studio 2015


#1

Hi there,

I am having an issue compiling the ofxDatGui library on a windows machine using Visual Studio 2015 with the latest release version of Openframeworks. The issue is a whole bunch of syntax errors and signed/unsigned mismatch errors. I’ll just dump some of the output below:

2>c:\of_v20180227_vs2015_release\addons\ofxdatgui\src\libs\ofxsmartfont\ofxSmartFont.h(34): error C3646: 'file': unknown override specifier (compiling source file ..\..\..\addons\ofxDatGui\src\libs\ofxSmartFont\ofxSmartFont.cpp)
2>c:\of_v20180227_vs2015_release\addons\ofxdatgui\src\libs\ofxsmartfont\ofxSmartFont.h(34): 
...

2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(92): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(98): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(654): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(659): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(809): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(830): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(859): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(869): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(883): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(900): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(915): warning C4018: '<': signed/unsigned mismatch
2>..\..\..\addons\ofxDatGui\src\ofxDatGui.cpp(917): warning C4018: '<': signed/unsigned mismatch
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

#2

I sort of fixed the issue by appending ‘using namespace std’ to the top of the file. How come the library assumes that std is in the namespace?


#3

You should let the developer know about the issue you are having, maybe opening an issue on the github repository.

P.S.
The suggested IDE on win for the last OF version is visual studio 2017, not 2015. Just in case you will have troubles in the future.


#4

OF 0.9.x has the std library as a global namespace, but that changed in ofx 0.10.0. I have seen several addons whit that problem (ofxCsv for example).


#5

yes we now include std in ofMain not in ofConstants so unless you include ofMain you won’t get the whole std namespace imported


#6

I understand what the problem is now. thank you!