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

Can't build with msvc #35

Open
code-monad opened this issue Nov 11, 2022 · 0 comments · May be fixed by #43
Open

Can't build with msvc #35

code-monad opened this issue Nov 11, 2022 · 0 comments · May be fixed by #43

Comments

@code-monad
Copy link
Contributor

code-monad commented Nov 11, 2022

The SMT-C's build script flags are not compatible in msvc environment hence it used gcc flags

Error Message:

 error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-static" "-I" "../../src" "-I" ".." "-I" "../deps/ckb-c-stdlib" "-W4" "-O3" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sectio
ns" "-Wall" "-Werror" "-Wno-unused-parameter" "-Wno-nonnull" "-D__SHARED_LIBRARY__" "-DCKB_STDLIB_NO_SYSCALL_IMPL" "-FoF:\\workspace\\cryptape\\sparse-merkle-tree\\c\\rust-tests\\target\\debug\\build\\rust-tests-34b7712421c0be08\\out\\../../src/ckb_smt.o" "-c" "../../src/ckb_smt.c" with args "cl.exe" did not ex
ecute successfully (status code exit code: 2)

How to fix this

Need to add an switch case statement in build.rs to detect target_env = "msvc", and adding something like __declspec(dllexport) to make keep the same symbol visibility in msvc environments

@code-monad code-monad linked a pull request Jan 5, 2023 that will close this issue
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 a pull request may close this issue.

1 participant