Comments (5)
Hi @jonassorgenfrei this seems like a symbol visibility issue to me.
I don't have a Windows machine to verify, so we'll need your help to track down the correct fix.
My understanding from the error message is that the linker does not see the half table symbols. My explanation for why that might be is that on Windows symbol visibility is hidden by default.
In PtexHalf.h try adding PTEXAPI
on the line right above struct PtexHalf {
(~line 87) and try rebuilding the ptex library. In theory that should make the PtexHalf symbols visible.
You may note that around line 160-121 some symbols (including the half tables members) were already marked visible, so it is kinda surprising that this is needed, but hopefully that's the root cause and fixes it.
Including PtexHalfTables.h is not advised -- those symbols are intended to be provided by the ptex library itself and you may later get errors about multiply-defined symbols if we went down that route.
Let me know whether adding the PTEXAPI
visibility macro fixes this issue for you.
from ptex.
Hey @davvid,
I tried building it again with the PTEXAPI Marco above the PtexHalf struct.
Unfortunatley this didn't fix the problem.
I then accidentally rebuild the Ptex_static project and was able to build halftest afterwards.
I figured out that when building the static libraries and linking against them everything works like a charm,
But building the dynamic libraries seems to produces the problem, may be its just a problem with Windows or Visual Studio (2019 and -17) As if the content of the Ptex.dll couldn't be found.
Shall halftest link against the dynamic or the static libraries? They were build at the same location with the same name, overwritting each other.
from ptex.
Looking at the build scripts, it's setup to build either static or dynamic.
We default to the following:
PTEX_BUILD_STATIC_LIBS=ON
PTEX_BUILD_SHARED_LIBS=ON
For Windows, I suspect that building the static library will work better. Does it work if you tweak the default (defined in CMakeLists.txt
) for PTEX_BUILD_SHARED_LIBS
to OFF
and rebuild from scratch?
If tweaking that default works then a patch to change the default for Windows might be a good idea.
BTW, I'm a little surprised that it built both and overwrote one. It's using an else if
in src/tests/CMakeLists.txt
so it should only consider one of the two variants. Nonetheless, hopefully tweaking that default should be sufficient. Let me know how that goes.
from ptex.
Yeah switching PTEX_BUILD_SHARED_LIBS to off worked perfectly.
Well I think building both comes from the src/ptex CMakeLists; there is no switch between Static and Shared and both have the same output name (line 22 and 35).
The CmakeLists in src/test seems to only link the already build static or shared library.
from ptex.
@jonassorgenfrei please test the windows-static-libs
branch in my fork -- it should DTRT by default now. Let us know how that goes.
from ptex.
Related Issues (20)
- Latest version? 2.1.33 or 2.3.0? HOT 2
- zlib API bleeds through header HOT 2
- Release tarball is unable to determine what version it is HOT 1
- Mac/Linux builds don't support -fvisibility=hidden HOT 3
- license confusion HOT 2
- uninstall ptex HOT 1
- Please add versioning on .so files HOT 3
- Code samples
- Build error : unknown target 'doc' HOT 2
- Exported cmake config files have wrong version (if doing out of source dir build?) HOT 5
- Exported cmake config should be called ptex-config-version.cmake
- CI verification for Linux and Windows
- Linking issues on Windows HOT 5
- cmake files is installed in agnostic architecture cmake path in linux HOT 1
- Linux GCC link error for PtexReader::MetaData::getEntry after disabling static library builds HOT 3
- How do I run the software? HOT 1
- Not able to build PTEX on FreeBSD HOT 2
- Ptex
- Ptex
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ptex.