how to set mingw or tdm-gcc as the compiler of sw
how to set mingw or tdm-gcc as the compiler of sw, sw always reminder " Exception in file D:/dev/cppan2/client2/src/sw/driver/compiler/detect.cpp:1417, function addSettingsAndSetPrograms: No suitable compilers found. Please, install one first."
Hi,
- Please run with
--traceflag and post the output. - Try to run sw in mingw shell (also post output if any error). Try
--compiler gccflags - Try to add g++ compiler from mingw to PATH.
- Please run with
--traceflag and post the output.- Try to run sw in mingw shell (also post output if any error). Try
--compiler gccflags
### do you mean command "sw build -compiler=gcc "
- Try to add g++ compiler from mingw to PATH.
### the path of g++ compiler was already included in Windows environment variables PATH
- Please run with --trace flag and post the output.
- Please run with --trace flag and post the output.
E:\Coding\sw\leptonic>sw build -compiler=gcc -trace
Starting sw...
version:
sw.client.sw version 1.0.0
git revision c6b731a48ee4660a922b0f9c140c8e24edac234a
assembled on
30.05.2024 19:29:15 UTC
31.05.2024 03:29:15 �й���ʱ��
command line:
sw build -compiler=gcc -trace
Checking remote version
Couldn't download db version file: Exception in file D:/dev/primitives/src/http/src/http.cpp:301, function download_file: url = https://raw.githubusercontent.com/SoftwareNetwork/database/master//db.version, curl error: Couldn't connect to server
Host configuration: {"os":{"arch":"x86_64","kernel":"com.Microsoft.Windows.NT"}}
Registering driver: org.sw.sw.driver.cpp-0.4.1
using sw frontend for input "E:/Coding/sw/leptonic\\sw.cpp"
build id 0000027155D82BF0 performing void __cdecl sw::SwBuild::loadInputs(void)
New host configuration: {"os":{"arch":"x86_64","kernel":"com.Microsoft.Windows.NT"},"sw_config":"true"}
Detected target: org.gnu.binutils.ar-2.36.1: null
Detected program: C:\TDM-GCC-64\bin\ar.exe
Detected target: org.gnu.gcc-10.3.0: null
Detected program: C:\TDM-GCC-64\bin\gcc.exe
Detected target: org.gnu.gpp-10.3.0: null
Detected program: C:\TDM-GCC-64\bin\g++.exe
Detecting msvc 14 and older
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
getWindowsKitRootFromReg::TryOpen error: 系统找不到指定的文件。
listWindows10KitsFromReg::TryOpen error: 系统找不到指定的文件。
listWindows10KitsFromReg::TryOpen error: 系统找不到指定的文件。
listWindows10KitsFromReg::TryOpen error: 系统找不到指定的文件。
New host configuration: {"os":{"arch":"x86_64","kernel":"com.Microsoft.Windows.NT"}}
Exception in file D:/dev/cppan2/client2/src/sw/driver/compiler/detect.cpp:1417, function addSettingsAndSetPrograms: No suitable compilers found.
Please, install one first.
Thank you.
So, gcc is visible, but there is some other issue. Need to check it.
Detected target: org.gnu.binutils.ar-2.36.1: null
Detected program: C:\TDM-GCC-64\bin\ar.exe
Detected target: org.gnu.gcc-10.3.0: null
Detected program: C:\TDM-GCC-64\bin\gcc.exe
Detected target: org.gnu.gpp-10.3.0: null
Detected program: C:\TDM-GCC-64\bin\g++.exe
So, gcc is visible, but there is some other issue. Need to check it.
### it seems that raw.githubusercontent.com was not existed.
It seems it is blocked in your country.
- Currently sw requires VS2022 or build tools for its own work. Known limitation. Please install it.
- Please try attached binary, I've updated some code bits for gcc to work. (Rename to sw.exe and replaces yours.)
- Sw packages will probably have many errors when built with gcc on windows. You can still report those issue right in this issue.
thanks,I will try