In gcc14 some functions were moved from std library to separate libs. Adding the correct include files for the new location solved the issue for other projects.
/build/freesynd/src/Freesynd-0.8-Source/utils/src/file.cpp: In static member function ‘static std::string File::getOriginalDataFullPath(const std::string&, bool)’:
/build/freesynd/src/Freesynd-0.8-Source/utils/src/file.cpp:265:14: error: ‘transform’ is not a member of ‘std’
265 | std::transform(second_part.begin(), second_part.end(), second_part.begin(),
| ^~~~~~~~~
/build/freesynd/src/Freesynd-0.8-Source/utils/src/file.cpp:270:14: error: ‘transform’ is not a member of ‘std’
270 | std::transform(second_part.begin(), second_part.end(), second_part.begin(),
| ^~~~~~~~~
Those lines in my first comment are wrong, it should be :
In the past gcc automatically added include statements for many functions that were not in std .
more and more of those include statements stopped being added autoimatically and need to be menioned explicitly.
Hi,
Thanks for your interest.
My compiler is GCC 11.4.0 so I don't reproduce the error.
According to https://en.cppreference.com/w/cpp/algorithm/transform, I see that transform is part of std.
The
<algorithm>
header is included through the inclusion of configfile.h.Do you know what would fix this error?
Last edit: benblan 2024-06-15
Yes, https://stackoverflow.com/questions/57136998/transform-is-not-a-member-of-std
helped .
Adding
#include <algorithm>
to utils/src/file.cpp worked.(patch-file attached)
After seeing your reply I did check utils/include/fs-utils/io/configfile.h but it doesn't contain an include for
<algortihm>
Sidenote :
I adopted the archlinux aur package for freesynd and updated it.
Maybe you could mention its existence somewhere ?
Are you building from the main branch or from elsewhere?
Oh I see: it is in the v0.8 release branch. I had already fixed it in the main branch. I will publish a v0.8.1.
@Lone_Wolf, I have uploaded the fix.
Could you test it from the release/v0.8 branch before I make a new release?
Thank you!
Yes, since there was an outdated freesynd pacakge from 2015, I felt it was better to revive that first and maybe add a trunk build later.
0.8 branch builds fine and a short playtest didn't show issues .
release source zipfile uses Freesynd for foldername while the branch downloaded by git uses lowercase freesynd . Maybe you could check how the source zip-file is created ?