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

fix: protobuf errors when switching release type #1023

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

nekiro
Copy link
Collaborator

@nekiro nekiro commented Jan 7, 2025

Description

Fix broken build after switching release type.

Behavior

Actual

Switching between Debug and Release generates error which fails to compile

Expected

It should compile just fine

Fixes

Fix #975

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@mehah
Copy link
Owner

mehah commented Jan 7, 2025

The only bad thing about this PR is that the libs are no longer packaged in the exe.

about problem:
This started happening after the 'vcpkg installed' folder was placed inside vc17, if we go back to how it was before, the problem disappears, but it starts to cause problems when generating the protebuf.

@nekiro
Copy link
Collaborator Author

nekiro commented Jan 8, 2025

The only bad thing about this PR is that the libs are no longer packaged in the exe.

about problem: This started happening after the 'vcpkg installed' folder was placed inside vc17, if we go back to how it was before, the problem disappears, but it starts to cause problems when generating the protebuf.

Right, it looks like it fails to compile, because of the mismatch between dynamic and static linking between release and debug. I added another commit that will build statically for both release types.

Copy link

sonarqubecloud bot commented Jan 8, 2025

@mehah mehah merged commit 0c59511 into mehah:main Jan 8, 2025
12 checks passed
@nekiro nekiro deleted the fix-compile branch January 8, 2025 16:19
@gesior
Copy link
Contributor

gesior commented Jan 8, 2025

@nekiro
It fixed problem with x64 compilation, but x86 still fails after changing build Debug -> DirectX.
I added this line:

<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

under this:
<WarningLevel>Level4</WarningLevel>

and now x86 works fine.
Can you make PR for this too?

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.

Cant build
4 participants