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

Cross compilation errors (cmake cannot find C++ compiler) #10

Open
ssokolen opened this issue Jul 9, 2022 · 0 comments
Open

Cross compilation errors (cmake cannot find C++ compiler) #10

ssokolen opened this issue Jul 9, 2022 · 0 comments

Comments

@ssokolen
Copy link

ssokolen commented Jul 9, 2022

Cross-compiling code that uses nlopt on linux (Manjaro) with x86_64-pc-windows-gnu as target fails because cmake is unable to find an appropriate C++ compiler (using something like /usr/bin/c++ instead of the mingw binaries). I have practically zero cross-compilation experience, but it struck me that the cmake log indicated no issues finding the correct gcc. Taking a look at build.rs for nlopt, I removed the line .define("CMAKE_CXX_COMPILER", "c++") locally and this seemed to fix the issue for me without adding any new issues for linux compilation. I'm not sure what the original role of this line is so I would hesitate to suggest its outright removal, but perhaps its impact on cross-compilation could be investigated further.

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

No branches or pull requests

1 participant