Need to have dll-interface to be used by clients of class

309 views
Skip to first unread message

Edwin Wiersma

unread,
Aug 1, 2022, 3:34:23 PM8/1/22
to alembic-discussion
Hi all,

I am new to compiling so I might have super simple issue but I'm also quite unsure what info might be of use.

My main goal is getting the Alembic executables in the bin folder to work.

I've got the following folders:
  • D:\dev\builds\imath_source (GitHub Clone)
  • D:\dev\builds\imath_build
  • D:\dev\builds\imath_install
  • D:\dev\builds\alembic_source (GitHub Clone)
  • D:\dev\builds\alembic_build
  • D:\dev\builds\alembic_install

Using the groups and the readme I've started with:

  1. cd D:\dev\builds\imath_build
  2. cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=D:\dev\builds\imath_install -G "Visual Studio 15 2017" D:\dev\builds\imath_source
  3. cmake --build .
And everything works out perfectly so far.

  1. cd D:\dev\builds\alembic_build
  2. cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=D:\dev\builds\alembic_install -G "Visual Studio 15 2017" -DImath_DIR:PATH="D:\dev\builds\imath_install\lib\cmake\Imath" D:\dev\builds\alembic_source
  3. cmake --build .
From the first cmake command I get the following feedback:
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19043.
-- CMAKE SYSTEM NAME: Windows
Defaulting CMAKE_CXX_STANDARD to 14
-- The install dir is D:/dev/builds/alembic_install
-- Found package Imath
-- Skipping AbcConvert: it requires USE_HDF5

   * Alembic Configuration              ===
   * USE_ARNOLD                         OFF
   * USE_BINARIES                       ON
   * USE_EXAMPLES                       OFF
   * USE_HDF5                           OFF
   * USE_MAYA                           OFF
   * USE_PRMAN                          OFF
   * USE_PYALEMBIC                      OFF
   * USE_STATIC_BOOST                   OFF
   * USE_STATIC_HDF5                    OFF
   * USE_TESTS                          ON
   * ALEMBIC_ILMBASE_LINK_STATIC        OFF
   * ALEMBIC_SHARED_LIBS                ON
   * ALEMBIC_DEBUG_WARNINGS_AS_ERRORS   ON
   * PYALEMBIC_PYTHON_MAJOR             3
   * DOCS_PATH                          OFF
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/builds/alembic_build

Here I get about 8 and half thousand C4251 warnings: "X needs to have dll-interface to be used by clients class of Y".

Some examples:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\xstring(4373): note: see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
D:\dev\builds\alembic_source\lib\Alembic/AbcGeom/FilmBackXformOp.h(109): warning C4251: 'Alembic::AbcGeom::v12::FilmBackXformOp::m_channels': class 'std::vector<Alembic::AbcCoreAbstract::v12::chrono_t,std::allocator<_Ty>>' needs to have dll-interface to be used by clien
ts of class 'Alembic::AbcGeom::v12::FilmBackXformOp' [D:\dev\builds\alembic_build\lib\Alembic\AbcMaterial\Tests\AbcMaterial_WriteGeometryWithMaterials.vcxproj]

D:\dev\builds\alembic_source\lib\Alembic/Abc/ITypedArrayProperty.h(226): note: see declaration of 'Alembic::Abc::v12::ITypedArrayProperty<Alembic::Abc::v12::Float64TPTraits>'
D:\dev\builds\alembic_source\lib\Alembic/AbcGeom/ICamera.h(177): warning C4251: 'Alembic::AbcGeom::v12::ICameraSchema::m_ops': class 'std::vector<Alembic::AbcGeom::v12::FilmBackXformOp,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'Ale
mbic::AbcGeom::v12::ICameraSchema' [D:\dev\builds\alembic_build\bin\AbcTree\abctree.vcxproj]

It's probably important to note that everything gets installed in D:\dev\builds\alembic_install

Even the executables in the "bin" folder but they can't be opened because the Alembic.dll was missing, while I have that to in the "lib" folder putting it with the executables is just making them crash right away.

Thanks for looking into my issue!

Edwin

Lucas Miller

unread,
Aug 1, 2022, 6:26:05 PM8/1/22
to alembic-discussion
It's most likely because D:\dev\builds\alembic_install is not part of your default path location.

When I try to run the Alembic test on Windows I often have to make sure I add the directory that the dll is in to my PATH env variable.

Lucas

Edwin Wiersma

unread,
Aug 2, 2022, 4:00:03 AM8/2/22
to alembic-discussion
Hi Lucas,

Thank you for the quick reply. Just to make sure I've added the  "alembic_build" and "alembic_install" to PATH but unfortunately the problem persists.

While traying it again I also managed to grab the first part and the first couple errors from the " cmake --build ." command which are in the second part of the code bellow.

Thanks again, if there's anything else I can provide please let me know.

Kind regards,
Edwin

set PATH=%PATH%;D:\dev\builds\imath_install;D:\dev\builds\alembic_build\;D:\dev\builds\alembic_install

cd D:\dev\builds\alembic_build

D:\dev\builds\alembic_build $ cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=D:\dev\builds\alembic_install -G "Visual Studio 15 2017" D:\dev\builds\alembic_source

-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.16.27045.0
-- The CXX compiler identification is MSVC 19.16.27045.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

-- CMAKE SYSTEM NAME: Windows
Defaulting CMAKE_CXX_STANDARD to 14
-- The install dir is D:/dev/builds/alembic_install
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE

-- Found package Imath
-- Skipping AbcConvert: it requires USE_HDF5

   * Alembic Configuration              ===
   * USE_ARNOLD                         OFF
   * USE_BINARIES                       ON
   * USE_EXAMPLES                       OFF
   * USE_HDF5                           OFF
   * USE_MAYA                           OFF
   * USE_PRMAN                          OFF
   * USE_PYALEMBIC                      OFF
   * USE_STATIC_BOOST                   OFF
   * USE_STATIC_HDF5                    OFF
   * USE_TESTS                          ON
   * ALEMBIC_ILMBASE_LINK_STATIC        OFF
   * ALEMBIC_SHARED_LIBS                ON
   * ALEMBIC_DEBUG_WARNINGS_AS_ERRORS   ON
   * PYALEMBIC_PYTHON_MAJOR             3
   * DOCS_PATH                          OFF
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/builds/alembic_build

D:\dev\builds\alembic_build $ cmake --build .

Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Building Custom Rule D:/dev/builds/alembic_source/lib/Alembic/CMakeLists.txt
  Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27045 for x86
  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /ID:\dev\builds\alembic_source\lib /ID:\dev\builds\alembic_build\lib /ID:\dev\builds\imath_install\include /ID:\dev\builds\imath_install\include\Imath /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D ALEMBIC_DLL /D PLATFORM_WINDOWS /D PLAT
  FORM=WINDOWS /D OPENEXR_DLL /D "CMAKE_INTDIR=\"Debug\"" /D ALEMBIC_EXPORTS /D _WINDLL /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++14 /Fo"Alembic.dir\Debug\\" /Fd"Alembic.dir\Debug\vc141.pdb" /Gd /TP /analyze- /errorRe
  port:queue D:\dev\builds\alembic_source\lib\Alembic\Util\Murmur3.cpp D:\dev\builds\alembic_source\lib\Alembic\Util\Naming.cpp D:\dev\builds\alembic_source\lib\Alembic\Util\SpookyV2.cpp D:\dev\builds\alembic_source\lib\Alembic\Util\TokenMap.cpp D:\dev\builds\alembic_so
  urce\lib\Alembic\AbcCoreAbstract\Foundation.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\TimeSampling.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\TimeSamplingType.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ArraySample
  .cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ReadArraySampleCache.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ScalarSample.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\BasePropertyWriter.cpp D:\dev\builds\alembic_sourc
  e\lib\Alembic\AbcCoreAbstract\ScalarPropertyWriter.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ArrayPropertyWriter.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\CompoundPropertyWriter.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCore
  Abstract\ObjectWriter.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ArchiveWriter.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\BasePropertyReader.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ScalarPropertyReader.cpp D:\de
  v\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ArrayPropertyReader.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\CompoundPropertyReader.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreAbstract\ObjectReader.cpp D:\dev\builds\alembic_source\lib\A
  lembic\AbcCoreAbstract\ArchiveReader.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\AprImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\ApwImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\AwImpl.cpp D:\dev\builds\alembic_source\l
  ib\Alembic\AbcCoreOgawa\CprData.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\CpwData.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\CpwImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\MetaDataMap.cpp D:\dev\builds\alembic_source\l
  ib\Alembic\AbcCoreOgawa\OrData.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\OwData.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\OwImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\ReadUtil.cpp D:\dev\builds\alembic_source\lib\Ale
  mbic\AbcCoreOgawa\ReadWrite.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\SprImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\SpwImpl.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreOgawa\StreamManager.cpp D:\dev\builds\alembic_source\lib
  \Alembic\AbcCoreOgawa\WriteUtil.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\ArchiveInfo.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\ErrorHandler.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\IArrayProperty.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\
  ICompoundProperty.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\IObject.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\ISampleSelector.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\IScalarProperty.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\OArrayProperty
  .cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\OCompoundProperty.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\OObject.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\OScalarProperty.cpp D:\dev\builds\alembic_source\lib\Alembic\Abc\Reference.cpp D:\dev\builds\a
  lembic_source\lib\Alembic\Abc\SourceName.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreFactory\IFactory.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreLayer\Read.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCoreLayer\Util.cpp D:\dev\builds\alembic_source
  \lib\Alembic\AbcGeom\ArchiveBounds.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\GeometryScope.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\FilmBackXformOp.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\CameraSample.cpp D:\dev\builds\alembic_sourc
  e\lib\Alembic\AbcGeom\ICamera.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OCamera.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\Basis.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\ICurves.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OCur
  ves.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OFaceSet.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\IFaceSet.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OLight.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\ILight.cpp D:\dev\builds\al
  embic_source\lib\Alembic\AbcGeom\ONuPatch.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\INuPatch.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OPoints.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\IPoints.cpp D:\dev\builds\alembic_source\lib\Alemb
  ic\AbcGeom\OPolyMesh.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\IPolyMesh.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OSubD.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\ISubD.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\Visibility.cp
  p D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\XformOp.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\XformSample.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\IXform.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcGeom\OXform.cpp D:\dev\builds\alembi
  c_source\lib\Alembic\AbcCollection\OCollections.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcCollection\ICollections.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcMaterial\OMaterial.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcMaterial\IMaterial.cpp D:\dev\bui
  lds\alembic_source\lib\Alembic\AbcMaterial\MaterialFlatten.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcMaterial\MaterialAssignment.cpp D:\dev\builds\alembic_source\lib\Alembic\AbcMaterial\InternalUtil.cpp D:\dev\builds\alembic_source\lib\Alembic\Ogawa\IData.cpp H:
  \dev\builds\alembic_source\lib\Alembic\Ogawa\IGroup.cpp D:\dev\builds\alembic_source\lib\Alembic\Ogawa\IStreams.cpp D:\dev\builds\alembic_source\lib\Alembic\Ogawa\OData.cpp D:\dev\builds\alembic_source\lib\Alembic\Ogawa\OGroup.cpp D:\dev\builds\alembic_source\lib\Alem
  bic\Ogawa\OStream.cpp
  Murmur3.cpp

  Naming.cpp
  SpookyV2.cpp
D:\dev\builds\alembic_source\lib\Alembic\Util\SpookyV2.cpp(220): warning C4267: '=': conversion from 'size_t' to 'uint8_t', possible loss of data [D:\dev\builds\alembic_build\lib\Alembic\Alembic.vcxproj]
  TokenMap.cpp
D:\dev\builds\alembic_source\lib\Alembic/Util/TokenMap.h(304): warning C4251: 'Alembic::Util::v12::TokenMap::m_map': class 'std::map<std::string,std::string,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' needs to have dll-interface to be used by clients of
class 'Alembic::Util::v12::TokenMap' [D:\dev\builds\alembic_build\lib\Alembic\Alembic.vcxproj]
          with
          [
              _Kty=std::string,
              _Ty=std::string
          ]
  D:\dev\builds\alembic_source\lib\Alembic/Util/TokenMap.h(68): note: see declaration of 'std::map<std::string,std::string,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>'
          with
          [
              _Kty=std::string,
              _Ty=std::string
          ]

Lucas Miller

unread,
Aug 2, 2022, 12:24:22 PM8/2/22
to alembic-d...@googlegroups.com
Sorry, I meant when I try to run the executables that are created, not when I'm compiling, that I make sure PATH is setup appropriately in order to find the Alembic.dll.


DLLs are searched for in the following locations in this order:

The application folder

The current folder

The Windows system folder

The Windows folder


Lucas


--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/ce207a8c-6e9c-440d-9657-2fa36bbd28cdn%40googlegroups.com.

Edwin Wiersma

unread,
Aug 5, 2022, 5:16:41 AM8/5/22
to alembic-discussion
Hi Lucas,

Thank you for your reply. I got the executables working. I'm currently also trying to compile the Maya plugins. I might need some help again later but thank you very much for helping out with the executables.

Kind regards,
Edwin Wiersma
Reply all
Reply to author
Forward
0 new messages