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

Fix linking errors with some compilers when MM:S plugins call function in tier1 interface.h. #34

Merged
merged 1 commit into from Sep 7, 2017

Conversation

Projects
None yet
2 participants
@psychonic
Member

psychonic commented Sep 6, 2017

Currently, if any MM:S plugin (using the PLUGIN_EXPOSE macro) statically links Valve's tier1 library, and makes calls to any of the functions from interface.h/cpp in tier1, some linkers will throw an error due to the CreateInterface export being defined twice.

In this case, there's no reason why we can't use tier1's CreateInterface implementation if it's available. Since we already require the Source SDK by default for MM:S plugins, we can use it in that case. If the META_NO_HL2SDK is defined, we can use the existing implementation.

@psychonic psychonic requested a review from asherkin Sep 6, 2017

@asherkin

Kinda surprised this works everywhere, but the code looks good and the change is sane!

@psychonic psychonic merged commit e770220 into master Sep 7, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@psychonic psychonic deleted the fix-tier1-interface-link branch Nov 3, 2017

psychonic added a commit that referenced this pull request Nov 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment