vsgXchange dll

84 views
Skip to first unread message

Don Burns

unread,
Jun 14, 2021, 7:46:55 PM6/14/21
to vsg-...@googlegroups.com
Hello all,

We are needing to use the vsgXchange library as a dll on Windows, but visual studio will not build with the configuration created by cmake with the BUILD_SHARED_LIBS=1 flag.

Specifically we get two MS errors C2338 and C2027:
image.png
image.png

Can anyone help with this?  Has anyone successfully built vsgXchange with BUILD_SHARED_LIBS=1 on windows?

-don

Robert Osfield

unread,
Jun 15, 2021, 3:32:45 AM6/15/21
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hi Don et. al,

I don't have a Window box to test against so the best I can do is speculate on what changes might be required.  Would really appreciate other Windows devs trying out the shader libs build to see what other insights we can uncover and help experiment with possible solutions.

I've done a review of the various *_fallback.cpp code and references to them in the CMake build system and so far I haven't spotted any errors, if there is a mistake in their I'm missing it so far.

Looking a the GDAL declaration in include/vsgXchange/images.h and src/gdal/GDAL_fallback.cpp are pretty straight forward:

-- from includevsgXchange/images.h

    /// optional GDAL ReaderWriter
    class VSGXCHANGE_DECLSPEC GDAL : public vsg::Inherit<vsg::ReaderWriter, GDAL>
    {
    public:
        GDAL();

        vsg::ref_ptr<vsg::Object> read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const override;

        bool getFeatures(Features& features) const override;

    protected:
        class Implementation;
        std::unique_ptr<Implementation> _implementation;
    };

-- from src/gdal/GDAL_fallback

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// GDAL ReaderWriter fallback
//
struct GDAL::Implementation
{
};
GDAL::GDAL()
{
}
vsg::ref_ptr<vsg::Object> GDAL::read(const vsg::Path&, vsg::ref_ptr<const vsg::Options>) const
{
    return {};
}
bool GDAL::getFeatures(Features&) const
{
    return false;
}

--

So GDAL::Implementation is implemented, but could it be an issue with export declaration of the inner GDAL::Implementation class? i.e. do we need to declare the GDAL class thus:

    /// optional GDAL ReaderWriter
    class VSGXCHANGE_DECLSPEC GDAL : public vsg::Inherit<vsg::ReaderWriter, GDAL>
    {
    public:
        GDAL();

        vsg::ref_ptr<vsg::Object> read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const override;

        bool getFeatures(Features& features) const override;

    protected:
        class VSGXCHANGE_DECLSPEC Implementation;
        std::unique_ptr<Implementation> _implementation;
    };

Or change from protected scope to private?

Could Windows users try out a shader library build and try the above?

Thanks,
Robert.

Robert Osfield

unread,
Jun 15, 2021, 4:45:33 AM6/15/21
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hi All,

The easiest change to make that might help is to change the scope of the nested forward declared classes, so I've created a NestedClassesPrivate branch of vsgXchange, and changed the scope from protected to private.  I think this change makes sense regardless of the Windows DLL issue so am inclined to merge with master as long as no issues are found.  The changes are:


Could a Windows users try out the DLL build of VSG, vsgXchange etc.  and see if this fixes the issues reported by Don?

Cheers,
Robert.

Don Burns

unread,
Jun 15, 2021, 11:48:27 AM6/15/21
to vsg-...@googlegroups.com
We'll try this today, Robert, and get back to you.

--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/8e5dd3c9-dffd-41d8-a743-0396c32c9adcn%40googlegroups.com.

Don Burns

unread,
Jun 15, 2021, 12:07:14 PM6/15/21
to vsg-...@googlegroups.com
Sorry, Robert.  Results are no better:
image.png

The entire build output is here for any visual studio experts that might pipe in.  The "cannot open file ..." error is consistent across multiple builds - another head scratcher.

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System
2>------ Build started: Project: vsgXchange, Configuration: Debug x64 ------
3>------ Skipped Build: Project: clang-format, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Build: Project: clobber, Configuration: Debug x64 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Build: Project: uninstall, Configuration: Debug x64 ------
5>Project not selected to build for this solution configuration
2>Building Custom Rule D:/Development/VSG/vsgXchange/src/CMakeLists.txt
2>Version.cpp
2>all.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::OSG::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(71): message : see declaration of 'vsgXchange::OSG::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::OSG::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::OSG::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::OSG::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::OSG::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::OSG::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(72): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::OSG::Implementation,std::default_delete<vsgXchange::OSG::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::OSG::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(71): message : see declaration of 'vsgXchange::OSG::Implementation'
2>cpp.cpp
2>glsl.cpp
2>spirv.cpp
2>stbi.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::GDAL::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::GDAL::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(102): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::GDAL::Implementation,std::default_delete<vsgXchange::GDAL::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::GDAL::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>dds.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::GDAL::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::GDAL::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(102): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::GDAL::Implementation,std::default_delete<vsgXchange::GDAL::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::GDAL::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>images.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::GDAL::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::GDAL::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(102): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::GDAL::Implementation,std::default_delete<vsgXchange::GDAL::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::GDAL::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>freetype.cpp
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(295,18): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(647,36): warning C4244: 'initializing': conversion from 'double' to 'unsigned int', possible loss of data
2>C:\Packages\VSG\include\vsg/core/Array.h(93,1): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(238): message : see reference to function template instantiation 'vsg::ref_ptr<vsg::Array<vsg::vec3>> vsg::Array<vsg::vec3>::create<unsigned __int64>(unsigned __int64)' being compiled
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(238): message : see reference to function template instantiation 'vsg::ref_ptr<vsg::Array<vsg::vec3>> vsg::Array<vsg::vec3>::create<unsigned __int64>(unsigned __int64)' being compiled
2>C:\Packages\VSG\include\vsg/core/Inherit.h(65,1): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(246): message : see reference to function template instantiation 'vsg::ref_ptr<Subclass> vsg::Inherit<vsg::Command,Subclass>::create<unsigned __int64,int,int,int>(unsigned __int64 &&,int &&,int &&,int &&)' being compiled
2>        with
2>        [
2>            Subclass=vsg::Draw
2>        ]
2>D:\Development\VSG\vsgXchange\src\freetype\freetype.cpp(246): message : see reference to function template instantiation 'vsg::ref_ptr<Subclass> vsg::Inherit<vsg::Command,Subclass>::create<unsigned __int64,int,int,int>(unsigned __int64 &&,int &&,int &&,int &&)' being compiled
2>        with
2>        [
2>            Subclass=vsg::Draw
2>        ]
2>assimp.cpp
2>D:\Development\VSG\vsgXchange\src\assimp\assimp.cpp(464,49): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::OSG::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(71): message : see declaration of 'vsgXchange::OSG::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::OSG::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::OSG::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::OSG::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::OSG::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::OSG::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(72): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::OSG::Implementation,std::default_delete<vsgXchange::OSG::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::OSG::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(71): message : see declaration of 'vsgXchange::OSG::Implementation'
2>ktx.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::GDAL::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::GDAL::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::GDAL::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::GDAL::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(102): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::GDAL::Implementation,std::default_delete<vsgXchange::GDAL::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::GDAL::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>OSG_fallback.cpp
2>D:\Development\VSG\vsgXchange\src\osg\OSG_fallback.cpp(22,1): warning C4099: 'vsgXchange::OSG::Implementation': type name first seen using 'class' now seen using 'struct'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(71): message : see declaration of 'vsgXchange::OSG::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,1): error C2027: use of undefined type 'vsgXchange::assimp::Implementation'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(54): message : see declaration of 'vsgXchange::assimp::Implementation'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2400): message : while compiling class template member function 'void std::default_delete<vsgXchange::assimp::Implementation>::operator ()(_Ty *) noexcept const'
2>        with
2>        [
2>            _Ty=vsgXchange::assimp::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2512): message : see reference to function template instantiation 'void std::default_delete<vsgXchange::assimp::Implementation>::operator ()(_Ty *) noexcept const' being compiled
2>        with
2>        [
2>            _Ty=vsgXchange::assimp::Implementation
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2439): message : see reference to class template instantiation 'std::default_delete<vsgXchange::assimp::Implementation>' being compiled
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(55): message : see reference to class template instantiation 'std::unique_ptr<vsgXchange::assimp::Implementation,std::default_delete<vsgXchange::assimp::Implementation>>' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2401,25): error C2338: can't delete an incomplete type
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2402,1): warning C4150: deletion of pointer to incomplete type 'vsgXchange::assimp::Implementation'; no destructor called
2>D:\Development\VSG\vsgXchange\include\vsgXchange/models.h(54): message : see declaration of 'vsgXchange::assimp::Implementation'
2>GDAL_fallback.cpp
2>D:\Development\VSG\vsgXchange\src\gdal\GDAL_fallback.cpp(22,1): warning C4099: 'vsgXchange::GDAL::Implementation': type name first seen using 'class' now seen using 'struct'
2>D:\Development\VSG\vsgXchange\include\vsgXchange/images.h(101): message : see declaration of 'vsgXchange::GDAL::Implementation'
2>curl.cpp
2>Generating Code...
2>Done building project "vsgXchange.vcxproj" -- FAILED.
6>------ Build started: Project: vsgconv, Configuration: Debug x64 ------
6>Building Custom Rule D:/Development/VSG/vsgXchange/applications/vsgconv/CMakeLists.txt
6>vsgconv.cpp
6>D:\Development\VSG\vsgXchange\applications\vsgconv\vsgconv.cpp(223,9): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
6>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\vsgXchanged.lib'
6>Done building project "vsgconv.vcxproj" -- FAILED.
7>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------
7>Building Custom Rule D:/Development/VSG/vsgXchange/CMakeLists.txt
8>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
8>Project not selected to build for this solution configuration
========== Build: 2 succeeded, 2 failed, 0 up-to-date, 4 skipped ==========

Don Burns

unread,
Jun 16, 2021, 6:19:20 PM6/16/21
to vsg-...@googlegroups.com
Hi Robert,

I was hoping Chris would chime in with his fix for us, but he hasn't yet.  The solution for us was to simply move the forward declared definitions for *::Implementation into their respective header files.  Visual Studio actually believes there is a difference between header files and .cpp files and processes them differently, and doesn't do run-time resolution of symbols.  So, we have to either forego our nice clean implementations or convince the world to stop using Windows.   I prefer the latter, but in order for us to move on, we have to do the former.  

Any chance you could get this change in?  We can send you a patch file if that helps.  We have some Summer interns who are not adept at implementing work around hacks and our environment has suddenly become counter productive.

Thanks,

-don

Robert Osfield

unread,
Jun 17, 2021, 4:03:41 AM6/17/21
to vsg-...@googlegroups.com
Hi Don,

On Wed, 16 Jun 2021 at 23:19, Don Burns <burn...@gmail.com> wrote:
Any chance you could get this change in?  We can send you a patch file if that helps.

It would be better to just get a patch or better yet a PR.  The alternative is me guessing what you've got working and then checking this in then have you test it, it'll be far quicker for me to at least have a code reference that I know works.

Cheers,
Robert.

Voerman, L.

unread,
Jun 17, 2021, 4:39:06 AM6/17/21
to vsg-...@googlegroups.com
I've created a pull request with the move of the Implementation classes that enables me to get the dll build through the compiler. 
No runtime testing done, so while it compiles the dll might not even load.
Laurens.

--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.

Robert Osfield

unread,
Jun 17, 2021, 1:00:52 PM6/17/21
to vsg-users : VulkanSceneGraph Developer Discussion Group
Thanks to Laurens for addressing this issue, PR merged with vsgXchange master.

The fix was replace using of std::unique_ptr<> with standard C pointers and adding an explicit delete into the destructors. 

It might be not be the modern C++17 way of managing memory but it does at least work reliably even with Microsoft's best attempt at using DLL hell to ruin our attempts a keeping implementation details out of headers.

Cheers,
Robert.

Don Burns

unread,
Jun 17, 2021, 1:04:27 PM6/17/21
to vsg-...@googlegroups.com
WOrks for us as well.  Thanks, Laurens!

--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages