Skip to content

Building on windows? #90

Description

@antithing

Hi, I am attempting to build this code on Windows / visual studio.

I am seeing this error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2248	'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>::Dim': cannot access private typedef declared in class 'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>' [D:\\Deep\OPP\openpose-plus-master\3rdparty\src\stdtensor-repo-build\stdtensor.vcxproj]	stdtensor-repo	d:\deep\opp\openpose-plus-master\3rdparty\src\stdtensor-repo\include\ttl\bits\raw_tensor.hpp	16	

It seems to be this line:

using S = basic_flat_shape<Dim>;

Is there anything I can do to get this building on windows?

Thanks!

Activity

  1. antithing commented on Apr 10, 2020

    @antithing
    Author

    This is what i have done so far:

    remove these lines from the cMakeLists.

    ADD_DEFINITIONS(-Wall)
    ADD_DEFINITIONS(-Werror)
    ADD_DEFINITIONS(-Wfatal-errors)
    

    commented out the <unistd.h> in

    openpose-plus-master\3rdparty\src\stdtracer-repo-build\stdtracer.vcxproj] stdtracer-repo d:\deep\opp\openpose-plus-master\3rdparty\src\stdtracer-repo\include\bits\stdtracer_log_ctx

    Then you get an error about isatty.

    change the isatty to _isatty, and add #include <io.h> to fix that one.

    That leaves errors:

    #include <cxxabi.h> //can't find this file

    and 'illegal indirection' in std_shape.hpp

    A little more googling tells me that we can just comment out //#include <cxxabi.h>

    and adjust the function below to:

    template <typename T>
    std::string demangled_type_info_name()
    {
        int status = 0;
       // return abi::__cxa_demangle(typeid(T).name(), 0, 0, &status);
        return name;
    }
    

    ref: https://en-mlog.blogspot.com/2012/01/using-cmdlineh-in-visual-c.html

    Now we have the illegal indirection error, and this new one:

    Severity	Code	Description	Project	File	Line	Suppression State
    Error	C2248	'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>::Dim': cannot access private typedef declared in class 'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>' [D:\Deep\OPP\openpose-plus-master\3rdparty\src\stdtensor-repo-build\stdtensor.vcxproj]	stdtensor-repo	d:\deep\opp\openpose-plus-master\3rdparty\src\stdtensor-repo\include\ttl\bits\raw_tensor.hpp	16	
    

    Which has me stumped.

    Thanks!

  2. lgarithm commented on Apr 10, 2020

    @lgarithm
    Collaborator

    @antithing thanks for your valuable debug information. I will have a deep look into this.
    But since I don't have a windows computer at the moment, it may take long.

    As a quick look, the last error suggests the following is private

    using Dim = typename S::dimension_type;

    so you may try moving it to public section after

    using shape_type = S;

    I'm also wondering how this error gets triggered, because in openpose-plus, raw_tensor is not used at all.

  3. lgarithm commented on Apr 10, 2020

    @lgarithm
    Collaborator

    note: the error is triggered at

    using S = basic_flat_shape<Dim>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions