Open Tdogb opened 3 weeks ago
This actually may be a bug with Conan. It seems to be detecting my system as x86 even though it is 64bit. Or it's just detecting MSVC as 32bit
C:\Users\tdogb\Documents\VSCode\weather\supercell-wx>cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=C:/Qt/6.7.1/msvc2019_64
-- Conan: Detected VS runtime: MD
-- Conan: checking conan executable
-- Conan: Found program C:/Program Files/Conan/conan/conan.exe
-- Conan: Version found Conan version 1.64.1
-- Conan executing: C:/Program Files/Conan/conan/conan.exe install C:/Users/tdogb/Documents/VSCode/weather/supercell-wx --remote conancenter --build missing --settings arch=x86 --settings build_type=Release --settings compiler=Visual Studio --settings compiler.version=17 --settings compiler.runtime=MD
Configuration:
[settings]
arch=x86
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=17
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
32-bit is not supported. What version of Visual Studio are you running? I'm assuming you have a 64-bit compiler installed.
You will want to edit your Conan default profile, changing arch from x86 to x86_64. You can edit this in the .conan folder in your home directory, or with the conan profile command.
32-bit is not supported. What version of Visual Studio are you running? I'm assuming you have a 64-bit compiler installed.
You will want to edit your Conan default profile, changing arch from x86 to x86_64. You can edit this in the .conan folder in your home directory, or with the conan profile command.
My conan profile is set up as follows
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
build_type=Release
[options]
[build_requires]
[env]
My system is 64bit Windows 10 with Visual Studio 2022
C:\Users\tdogb\Documents\VSCode\weather\supercell-wx>cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=C:/Qt/6.7.1/msvc2019_64 -- Conan: Detected VS runtime: MD -- Conan: checking conan executable -- Conan: Found program C:/Program Files/Conan/conan/conan.exe -- Conan: Version found Conan version 1.64.1 -- Conan executing: C:/Program Files/Conan/conan/conan.exe install C:/Users/tdogb/Documents/VSCode/weather/supercell-wx --remote conancenter --build missing --settings arch=x86 --settings build_type=Release --settings compiler=Visual Studio --settings compiler.version=17 --settings compiler.runtime=MD Configuration:
Note --settings arch=x86
. Something is overriding arch=x86_64 in your profile. When I run, I get the following:
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build D:/Projects/build-supercell-wx --config Release --target supercell-wx --
[build] CMake is re-running because D:/Projects/build-supercell-wx/CMakeFiles/generate.stamp is out-of-date.
[build] the file 'C:/Program Files/CMake/share/cmake-3.25/Modules/CMakeCCompiler.cmake.in'
[build] is newer than 'D:/Projects/build-supercell-wx/CMakeFiles/generate.stamp.depend'
[build] result='0'
[build] -- Conan: Detected VS runtime: MD
[build] -- Conan: checking conan executable
[build] -- Conan: Found program C:/Users/dpaul/AppData/Local/Programs/Python/Python312/Scripts/conan.exe
[build] -- Conan: Version found Conan version 1.64.1
[build] -- Conan executing: C:/Users/dpaul/AppData/Local/Programs/Python/Python312/Scripts/conan.exe install C:/Users/dpaul/git/supercell-wx --remote conancenter --build missing --settings arch=x86_64 --settings build_type=Release --settings compiler=Visual Studio --settings compiler.version=17 --settings compiler.runtime=MD --settings compiler.cppstd=17
CMake might require a -A x86_64
argument to force the architecture?
C:\Users\tdogb\Documents\VSCode\weather\supercell-wx>cmake -B build-debug -S . -A x86_64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_PREFIX_PATH=C:/Qt/6.7.1/msvc2019_64
CMake Error at CMakeLists.txt:3 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x86_64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Spent hours fixing this error before, but don't remember how I did it. Feeling like one of those endless rabbit holes to get this compiled haha
I have not used the NMake Makefiles generator, and not sure if it'd work on Windows. I'd recommend the Ninja generator since you're using VS Code, otherwise the Visual Studio generator should work OK.
You can also try running the setup-*.bat script to initialize your build directory, and configure VS Code to reference your already configured/generated directory (CMake plugin settings).
I usually don't program desktop applications, but I'm motivated to add some features to this code for a project I'm working on. After a lot of struggle, I've gotten to this point. It appears that during build, it is trying to build as x86 which isn't compatible with some packages, any ideas to what I should do to fix the build? My system itself is Windows 10 x64