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 static build linking on windows #1903

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions templates/cpp/static/BuildMain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<lib name="rpcrt4.lib" />
<lib name="dwrite.lib" />
<lib name="setupapi.lib" />
<lib name="crypt32.lib" />

</section>

Expand Down
4 changes: 2 additions & 2 deletions templates/cpp/static/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUG)
#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUGGER)
#include <windows.h>
#endif

Expand All @@ -14,7 +14,7 @@ ::foreach ndlls::::if (registerStatics)::
extern "C" int ::nameSafe::_register_prims ();::end::::end::


#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUG)
#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUGGER)
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
#else
extern "C" int main(int argc, char *argv[]) {
Expand Down