![]() I have also tried this C:/Program\\ Files\\ (x86). I have tried escaping these spaces with backslashes and the results are the same. It seems pretty obvious that cmake is interpretting every space as a delimeter for different flags to give to the compiler when it should just be a single flag. LINK : fatal error LNK1181: cannot open input file 'Files.obj'ĭetecting C compiler ABI info failed to compile with the following output:Ĭhange Dir: C:/Users/underdisc/home/tech/varkor/build/msvc64/CMakeFiles/CMakeTmp Studio/2019/Community/VC/Tools/MSVC/0/include\ Microsoft (R) Incremental Linker Version 1.0 All rights reserved.Ĭl : Command line warning D9024 : unrecognized source file type 'Files', object file assumedĬl : Command line warning D9024 : unrecognized source file type '(x86)/Microsoft', object file assumedĬl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumedĬl : Command line warning D9024 : unrecognized source file type 'Studio/2019/Community/VC/Tools/MSVC/0/include"', object file assumedĬl : Command line warning D9024 : unrecognized source file type '(x86)/Windows', object file assumedĬl : Command line warning D9024 : unrecognized source file type 'Kits/10/Include/6.0/um"', object file assumedĬl : Command line warning D9024 : unrecognized source file type 'Kits/10/Include/6.0/ucrt"', object file assumedĬl : Command line warning D9024 : unrecognized source file type 'Kits/10/Include/6.0/shared"', object file assumed Microsoft (R) C/C++ Optimizing Compiler Version 1 for 圆4Ĭopyright (C) Microsoft Corporation. Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.Ĭompiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/0/bin/Host圆4/圆4/cl.exeīuild flags: /I/"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/0/include" /I/"C:/Program Files (x86)/Windows Kits/10/Include/6.0/um" /I/"C:/Program Files (x86)/Windows Kits/10/Include/6.0/ucrt" /I/"C:/Program Files (x86)/Windows Kits/10/Include/6.0/shared" When I looked inside CMakeError.log, I found this monstrosity. /, the simple test program actually fails to compile. When I run cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="./msvc64.toolchain". It’s actually a bit further away from functional. This definitely feels closer to something that is actually functional, but it is still not working. I decided to use a similar solution in my msvc64.toolchain file and this is what it looks like now. ![]() This allows me to run clc to compile, and cll to link from my terminal using the microsoft compiler. I ended up creating this file (it’s weird, I know). I have encountered this problem before when I had a serious urge to simply use cl from the mintty terminal. This allows cmake to select the correct compiler for building the project, but it fails when compiling the simple cmake test program due to missing library files that need to be linked to build the simple test. Set(compiler "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/0/bin/Host圆4/圆4/cl.exe") I found out about cmake toolchain files and decided to create a simple one to specify cl as the compiler to be used. It identifies the mingw compiler that I have already confirmed to work for building the project. / from one my tmux panes, cmake doesn’t identify cl as the default compiler. From this command prompt, I can run the following and everything will build and link. This prompt calls C:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\Common7\Tools\VsDevCmd.bat on startup. My only solution to this has been using the Developer Command Prompt that comes with Visual Studio (2019 Community in my case). This is great, but if I am going to make windows builds that I eventually intend on distributing, I think it’s important that I can do 32bit and 64bit builds with msvc, but being able to do this within my tmux mintty session seems nearly impossible. After a lot of trial and error, I can now build my project with cmake and ninja while using mingw as the compiler. ![]() ![]() I have recently begun a new project and one of the first things I want to tackle is getting through all the hard parts involved in setting up the build system. For example, I use a native windows build of cmake (3.18.1) and not the one that is distributed with cygwin. I tend to avoid using other utilities from cygwin due to them not working with a lot of native windows utilities. From cygwin, I primarily use mintty with tmux and vim. I use cygwin on windows purely to act as my dev environment. I have come pretty far, but there are still a few problems preventing me from finishing this. Sorry in advance because this is a little long, but I have been trying to get this to work for about a week now with no luck. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |