-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking issues on Windows #65
Comments
I'm in critical danger of stepping beyond my windows knowledge, but there are a few common gotchas that I would double check first:
|
Hi Larry/@lgritz, Thanks for replying!
|
I too am having this issue, I was curious if you ended up finding anything. My only guess was that OIIO was somehow looking for static ptex even during shared lib linking because of the
But I could not find anything in my OIIO vcxprojs or cmake files to suggest that OIIO is looking for static so I am scratching my head on this as well. EDIT:
Updating those files fixed it for me |
Oh, nice find! We don't actually use the static libs much, and Windows even less, so this is a blind spot for us on Linux where we have libPtex.so and libPtex.a that don't conflict. We should probably add some notes to the README about the I'll leave this issue open since we should probably change this so that the static lib are output as Heads-up @sunyab ~ hopefully that'll simplify |
The DLLImport thing is sort of a red herring, it's only there to generate headers for things that link to the DLL and need to know about the class interfaces so the export decls get put on the functions during the build and the headers are generated with the import symbols. Normally you build the shared and static libs by setting two targets in CMake with different names (not output names), one with static and one with shared linkage... it'll naturally put them in different output directories and use the add_library name as the base name. This is cleaner because it makes CMake auto-sort things into the right places vs trying to find where you buried the output name definition and it allows importing from the project using the shared or static name and having everything else automagically work. See this -- it's supposed to be controlled with the output directory variables, then whatever wants to link to it uses that structure if it's not integrating with the project CMakeFiles or selects shared vs. static linkage using the variables cmake creates in its caches (see this). |
Hello,
I'm trying to build OpenImageIO with Ptex support and I'm having linking issues:
I looked at the exported symbols in my built Ptex.dll and there are small differences between what OpenImagIO is looking for and what is being exported:
public: __cdecl Ptex::v2_3::String::~String(void)
public: __cdecl Ptex::v2_3::String::~String(void) __ptr64
public: static class Ptex::v2_3::PtexTexture * __cdecl Ptex::v2_3::PtexTexture::open(char const *,class Ptex::v2_3::String &,bool)
public: static class Ptex::v2_3::PtexTexture * __ptr64 __cdecl Ptex::v2_3::PtexTexture::open(char const * __ptr64,class Ptex::v2_3::String & __ptr64,bool)
As far as I can tell, the only difference is
__ptr64
, I'm building everything forx64
and I'm unclear if it is an OIIO issue at this point or Ptex. Paging @lgritz just in case he has an idea!Cheers,
Thomas
The text was updated successfully, but these errors were encountered: