Git Product home page Git Product logo

Comments (2)

Caldfir avatar Caldfir commented on August 23, 2024

I believe this is related to some warnings I'm getting from VisualStudio:

2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(348,23): warning C4251: 'cppfs::FilePath::m_path': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(352,35): warning C4251: 'cppfs::FilePath::m_fullPath': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(353,35): warning C4251: 'cppfs::FilePath::m_filename': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(354,35): warning C4251: 'cppfs::FilePath::m_basename': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(355,36): warning C4251: 'cppfs::FilePath::m_extension': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(356,40): warning C4251: 'cppfs::FilePath::m_directoryPath': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
2>vcpkg\installed\x64-windows\include\cppfs/FilePath.h(357,38): warning C4251: 'cppfs::FilePath::m_driveLetter': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppfs::FilePath'
2>F:\Programs\VisualStudio\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'

I'm sort of confused why the error is showing up when I'm building an executable, not a dll, and C4251 seems to explicitly be about dll compilation. It isn't hurting me, but warnings are annoying.

from cppfs.

lppinto avatar lppinto commented on August 23, 2024

If some include prototypes declares a class that has public or even private stl members, this might be the case… I for once would use the pimpl pattern to hide those complex members that don't have dll interface exports (stl templates) and would substitute those with getters to get more simplified types (std::string -> const char*)

from cppfs.

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.