Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not c++17 compliant #30

Open
fred-dev opened this issue Dec 19, 2022 · 14 comments
Open

not c++17 compliant #30

fred-dev opened this issue Dec 19, 2022 · 14 comments

Comments

@fred-dev
Copy link

Hi, I wanted to check if you are still going to develop this addon. It is not c++17 compliant as it uses a few functions that no longer exist like std::ptr_fun and std::filesystem::extension, as you are aware this addon is also a dependant for your ofxHTTP addon (which is also not c++ 17 compliant). The upcoming OF release (and the current master use c++17), I have several porjects relying on these addons and am wondering if you think you might get around to this or if I should start looking for other solutions.

@bakercp
Copy link
Owner

bakercp commented Dec 21, 2022

Hi there, I don't currently have time to update these, but I would welcome pull requests.

@fred-dev
Copy link
Author

I'd love to but I had a look at some of the issues and it was beyond my understanding. Ill give it a go anyway and see how far I get.

Thanks for the helpful code anyway.

@rjx-ray
Copy link

rjx-ray commented May 30, 2023

Hi, I've come across this issue after updating to an OF nightly build as recommended at https://forum.openframeworks.cc/t/note-nightly-builds-recommended-over-0-11-2/41220. We need C++17 for some WinRT developments in our app and are eagerly awaiting the OF12 release which is said to be imminent.

I see "fred-dev" has submitted a pull request with a fix but it has not yet yet been accepted. I tried it anyway and can confirm that it builds without issues but we don't use the RecursiveDirectoryIterator so I haven't tested it.

With the upcoming OF12 release will you be looking at the pull request sometime soon?

@rjx-ray
Copy link

rjx-ray commented May 30, 2023

Actually that fixed only the include error from "ofx/RecursiveDirectoryIterator.h".

After fixing many other errors in the OF12/C++17 version of my app I'm getting an error whilst compiling DrectoryUtils.cpp:

Error C2143 syntax error: missing ',' before '<' IglooCoreEngine ofxIO\libs\alphanum\include\alphanum.hpp 308

I'll see if I can track it down tomorrow

@rjx-ray
Copy link

rjx-ray commented May 31, 2023

The error was because std::binary_function has been removed from C++17.
I couldn't see what was using alphanum_less so commented out lines 307 to 314 of alphanum.hpp to see where I got errors.
But I didn't then get any build errors so I think its not needed.

@moebiussurfing
Copy link

Hello @fred-dev
I am having this error:
#32

Should i roll back these new two commits?
I am not using the OF nighty, just master branch.

@fred-dev
Copy link
Author

fred-dev commented Aug 9, 2023

Hi I don't have access to windows easily now. I can check this out in a few days. Is your OF from the git main up to date? I'm not sure when each of the changes came through VS where you branch of OF is. If you can it would be good to check against the latest commits to the main branch of OF. I had checked the c++17 changes on windows a few months ago. I will check again but if I need to make changes I'll be aiming to make things work with current commits as the current release cycle is out the window and OF is advising nightlies.

@moebiussurfing
Copy link

moebiussurfing commented Aug 12, 2023

Yes, I was using OF master branch with recent commits...

But I solved it for my use by rolling back the commits to the latest 2019 from ofxIO develop branch.
This works for the Github path-release branch and probably works also with OF 0.12 downloadable release too.
(If I am not wrong, these are C++14.)

@moebiussurfing
Copy link

Any progress to make it work under Windows?
@bakercp , @fred-dev
I am updating to OF 0.12/C++17 but having too many errors/branches...

@fred-dev
Copy link
Author

I had a quick look and made some changes so the code is compatible with win c++17 (these changes were to ofxIO) - I also merged the develop branch of ofxIO on my fork to the master, so you should be able to use the master branch of both repos. At the moment I have pulled all commits to the main branch of OF and am using Visual Studio 2022 and the code compiles. ****But there is a linker error I did not track down. There is a requirement on ofxPoco for the libraries required to use SSL. There is a linker error that needs to be solved linking libcrypto from ofxPoco. This could come from the project generator, or just that I need to download libs again. At some point a long time ago I had an issue with ofxPoco not being bundled with these libs for windows. Let me know if these changes work for you.

@fred-dev
Copy link
Author

Ok, had a further look, you need to add this path to the additional library directories in the visual studio project properties ..\..\..\addons\ofxPoco\libs\openssl\lib not sure where this comes from, maybe @bakercp knows.

@moebiussurfing
Copy link

moebiussurfing commented Sep 28, 2023

Thanks a lot @fred-dev ,

I'll try soon and report back.

I was having this libcrypto error too:

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB6006	"link.exe" exited with code 1104.	example_json_utils	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets	1134	
Error	LNK1104	cannot open file 'libcrypto64mdd.lib'	example_json_utils	C:\Users\moebi\Documents\of_v0.12.0_vs_release\addons\ofxIO\examples\json\example_json_utils\LINK	1

PS
I am trying to make ofxHTTP work back and requires all these (sub) addons.
I only need to check folder-file-changes and some REST API HTTP logging.
I don't know if some files can be removed maybe, to avoid fix things that maybe we don't need to use...

@fred-dev
Copy link
Author

If you don't need ssl then you can get away without these tools and life will be much easier. The standard built in OF tools can handle a lot of functions.

@moebiussurfing
Copy link

Well...
in fact, I think that I’ll need SSL to login into colourlovers
I need to fix that addon: https://github.com/moebiussurfing/ofxColourLoversHelper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants