Skip to content
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

Windows compile fixes #1263

Merged
merged 3 commits into from
Oct 9, 2020
Merged

Conversation

debaetsd
Copy link
Contributor

@debaetsd debaetsd commented Oct 8, 2020

Description

This PR fixes various small issues when trying to build OSL on Windows (issue #1261).

  • dllimport/export attributes should be defined on nested classes (prevent missing symbols)
  • MSVC does not has cxxabi.h so do not try to import it (fixes compile error)
  • oslcomp/oslquery were defining OSL_EXPORTS while they should import (prevent missing symbols)
  • link with Version.lib (system library) to prevent missing symbols inside ClangDriver.

Tests

master now compiles better on MSVC.
Still not 100% clean for me (shaders is giving errors) but core is fully functional

Checklist:

  • [ x] I have read the contribution guidelines.
  • [ x] I have previously submitted a Contributor License Agreement. <-- send today (October 8th 2020)
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • [ x] My code follows the prevailing code style of this project.

- Link with Version.lib (system lib) to prevent missing symbols in
  ClangDriver.lib
- Do not define OSL_EXPORTS for oslcomp/oslquery as they should import
  (not export)
@debaetsd debaetsd mentioned this pull request Oct 8, 2020
@lgritz lgritz merged commit 6a303aa into AcademySoftwareFoundation:master Oct 9, 2020
lgritz pushed a commit to lgritz/OpenShadingLanguage that referenced this pull request Oct 9, 2020
* Added OSLEXECPUBLIC attributes to inner classes of LLVM_Util to fix
linker errors on MSVC

* do not include cxxabi.h on non GNUC platforms

* fixed windows linker issues

- Link with Version.lib (system lib) to prevent missing symbols in
  ClangDriver.lib
- Do not define OSL_EXPORTS for oslcomp/oslquery as they should import
  (not export)

Co-authored-by: Dieter De Baets <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants