-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
cosmocc toolchain not working in windows #5552
Comments
not found, you can check it, or run |
cosmocc cannot be found because it is not an exe file
|
it does not support for windows. because we need bash/sh to load it. you can try this patch. #5553 But it's not perfect yet now and we should automatically load sh/bash in the toolchain |
|
Did you add msys2 package to your project now? |
I have now added it and it still does not use cosmocc: add_rules("mode.debug", "mode.release")
if is_subhost("windoows") then
add_requires("msys2")
add_packages("msys2")
end
add_requires("cosmocc")
target("test")
set_kind("binary")
add_files("src/*.cpp")
set_toolchains("@cosmocc")
|
Did you add msys2 package to your project now? |
cosmocc toolchain works and compiles using cosmocc but setting the toolset to add_rules("mode.debug", "mode.release")
add_requires("cosmocc")
target("test")
set_kind("binary")
add_files("src/*.cpp")
set_toolchains("@cosmocc")
set_toolset("cxx", "cosmoc++")
set_toolset("ld", "cosmoc++")
set_toolset("sh", "cosmoc++")
|
please do not call please just use |
The cosmocc toolchain already use cosmoc++, so you don't need to change it. xmake/xmake/toolchains/cosmocc/xmake.lua Lines 31 to 35 in f20c40b
|
Ok, I updated the xmake.lua and it does not use cosmoc++ to compile the program (It uses cosmocc to compile the program) add_rules("mode.debug", "mode.release")
add_requires("cosmocc")
target("test")
set_kind("binary")
set_languages("c++17")
add_files("src/*.cpp")
set_toolchains("@cosmocc") #include <iostream>
int main(int argc, char** argv) {
std::cout << "Hello, World!" << std::endl;
return 0;
}
|
This comment was marked as outdated.
This comment was marked as outdated.
Compiling the project with abseil does not work with cosmoc: add_rules("mode.debug", "mode.release")
add_requires("cosmocc")
add_requires("abseil")
target("test")
set_kind("binary")
set_languages("c++17")
add_packages("abseil")
add_files("src/*.cpp")
set_toolchains("@cosmocc")
|
you need move |
Compiling with abseil with add_rules("mode.debug", "mode.release")
add_requires("cosmocc")
set_toolchains("@cosmocc")
add_requires("zlib")
target("test")
set_kind("binary")
set_languages("c++17")
add_packages("zlib")
add_files("src/*.cpp")
|
try xrepo remove --all -y cosmocc
xrepo update-repo
xmake f -cvD
xmake |
add_rules("mode.debug", "mode.release")
add_requires("cosmocc")
set_toolchains("@cosmocc")
add_requires("zlib")
target("test")
set_kind("binary")
set_languages("c++17")
add_packages("zlib")
add_files("src/*.cpp")
|
window platform will bind msvc toolchain, it does not support to switch toolchain. please use cross platform xmake update -s dev
xmake f -p cross -cvD
xmake BTW, some packages and cmake maybe does not support cosmocc. |
I got a new error while installing zlib and I got a new error while installing abseil:
abseil:
|
you need to run it on msys2. it need make |
Ok, I ran it in the
|
try this patch. #5579 |
I got this new error:
|
maybe cmake does not support cosmocc, it's a cmake issue or you can try call it on msys2. |
duplicate #6010 (comment) |
Xmake Version
xmake v2.9.4+dev.0d2bd1503
Operating System Version and Architecture
Windows 10 22H2
Describe Bug
When I build with the cosmocc toolchain, cosmocc is not found.
Expected Behavior
Builds exe with cosmocc
Project Configuration
Commands:
xmake f -p windows -vD
xmake -vD
xmake.lua:
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: