Giter Site home page Giter Site logo

Comments (4)

SSBMTonberry avatar SSBMTonberry commented on August 16, 2024

I need some more information to able to help you here.
What OS are you using, compiler or build system. Would also be useful to know what version of Tileson you use as well :)
If your build system is somehow set to something lower than C++17, you'd probably get an error like this, but I really have nothing to go on to help you here, yet.

Edit: A small code snippet could also be useful, unless you can link me to a project.

from tileson.

SeleDreams avatar SeleDreams commented on August 16, 2024

I need some more information to able to help you here.
What OS are you using, compiler or build system. Would also be useful to know what version of Tileson you use as well :)
If your build system is somehow set to something lower than C++17, you'd probably get an error like this, but I really have nothing to go on to help you here, yet.

Edit: A small code snippet could also be useful, unless you can link me to a project.

I'm using Windows 10 with the MinGW-w64 toolchain and using cmake,
I use the latest release from here as an hpp include (1.2.0)
My project c++ v is set to c++20 but i also tried c++ 17, it didn't change anything, snippet wise i'm not really sure what it would change as i get this error with the simple fact to include the hpp no matter the rest of the code even when not actually using it

from tileson.

SSBMTonberry avatar SSBMTonberry commented on August 16, 2024

Compiling with C++17 or higher should be fine, as long as your compiler supports it 🙂
This may sound like a stupid question, but are you able to compile and run a bare-bone program using just a simple program like this?

#include <string_view>
#include <iostream>

int main(int argc, char **argv)
{
    std::string_view str{"Just a test"};
    std::cout << "Test: " << str;
    return 0;
}

For reference, you could use this simple CMakeLists.txt for the above example:

cmake_minimum_required(VERSION 3.11)
project(Dummy)

set(CMAKE_CXX_STANDARD 17)

set(SOURCE_FILES main.cpp )
add_executable(Dummy ${SOURCE_FILES} )

Also, keep in mind the version of your MinGW-w64 toolchain must support the filesystem and string_view features of C++17.
Unfortunately Tileson has not been tested with MinGW, but it has been well tested using MSVC on Windows, GCC og Linux, and Clang on OSX. I also remember I've had some issues with MinGW in the past, experimenting with std::filesystem stuff, so I'm suspecting that your current MinGW toolchain might not support string_view (or maybe C++17 features in general).

Could you test the above code on your system using MinGW and report back the result? 🙂

Also: Which version of MinGW-w64 are you using?

from tileson.

SSBMTonberry avatar SSBMTonberry commented on August 16, 2024

Closing issue due to inactivity. Also tested newest release of Tileson with the supported compilers for all platforms with no issue, so assuming this is a MinGW issue with lack of support for needed C++17 features.

from tileson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.