error while building db grid file using cmake - c++

I am following this link [griddb cclient]
1
and building file using cmake at E:/griddb/c_client/client/c/sample
But it shows following error
CMake Error at CMakeLists.txt:14 (project): Generator
Visual Studio 17 2022
could not find any instance of Visual Studio.
Configuring incomplete, errors occurred! See also "C:/Program
Files/CMake/bin/CMakeFiles/CMakeOutput.log".
and in log file:
The log files shows
The system is: Windows - 6.3.9600 - x86

Related

VS Code User, C++, CMake, BUild and Release, SDK

while build SDK in Visual Studio Code using CMAke i am getting this error I tried all the available solution on Internet but not yet resolve please help?[enter image description here]
(https://i.stack.imgur.com/EXiU6.png)
ERROR MESSAGE
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Sony_SDK/CMakeFiles/CMakeOutput.log".
i want the solution of this error
Selecting a platform is only possible on the Visual Studio generator.
Either use the Visual Studio generator (-G "Visual Studio 16 2019") or drop the platform argument.
Or consult the documentation of the SDK you received.

Python OpenCv build is not detecting visual studio 2019 in command line

When i try to build the opencv package in python using command line
PS C:\Program Files\Open_CV\opencv-python> python setup.py build
It throws an error:
Version: 4.3.0+3073e9e
setup.py:85: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
['python/cv2[^/]*%(ext)s' % {'ext': re.escape(sysconfig.get_config_var('SO'))}],
Trying "Visual Studio 14 Win64" generator
Not searching for unused variables given on the command line.
Selecting Windows SDK version to target Windows 10.0.18363.
CMake Error at CMakeLists.txt:2 (PROJECT):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
Configuring incomplete, errors occurred!
See also "C:/Program Files/Open_CV/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Trying "Visual Studio 14 Win64" generator - failure
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.8 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
They don't automatically detect VS2019 yet. You have to specify the generator.
python setup.py build -G "Visual Studio 16 2019"

Building GRPC keeps failing on windows

I am trying build grpc CPP from the source using CMake as described in github for Windows but it is keep on failing with following error:
E:\gok\IEC61850\grpc\New folder\grpc>md .build
E:\gok\IEC61850\grpc\New folder\grpc>cd .build
E:\gok\IEC61850\grpc\New folder\grpc\.build>cmake .. -G "Visual Studio 14 2015"
CMake Error at CMakeLists.txt:31 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "E:/gok/IEC61850/grpc/New folder/grpc/.build/CMakeFiles/CMakeOutput.log

CMake Configuration Issue when using Qt Creator

I am trying to set up a build environment in qt creator using cmake, but no matter what I try I cannot get it to progress. It fails with issue; "Configuration Issue". When expanding the details in the General Messages section it looks like its failing to compile a test c program.
I can't see anything wrong with my qt creator configuration; which I had to set up in the past manually to use qmake for a qt app. This worked as desired. Here is that configuration.
This is the error in full as displayed in general messages;
Running Windows Runtime device detection.
No winrtrunner.exe found.
Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{8454d5f3-9c7b-42c8-8f39-a6bfbbbdd562}" --experimental" in
C:\Users\Andrew\AppData\Local\Temp\QtCreator-l9Mfi9\qtc-cmake-XXUaBP1D.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/BIN/x86_amd64/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_2c22c\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f
CMakeFiles\cmTC_2c22c.dir\build.make /nologo -L
CMakeFiles\cmTC_2c22c.dir\build
Building C object CMakeFiles/cmTC_2c22c.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\BIN\X86_AM~1\cl.exe
#C:\Users\Andrew\AppData\Local\Temp\nm7672.tmp
testCCompiler.c
Linking C executable cmTC_2c22c.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_2c22c.dir --manifests --
C:\PROGRA~2\MICROS~1.0\VC\bin\X86_AM~1\link.exe /nologo
#CMakeFiles\cmTC_2c22c.dir\objects1.rsp
#C:\Users\Andrew\AppData\Local\Temp\nm76B2.tmp
MT failed to run.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
Configuring incomplete, errors occurred!
See also "C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeError.log".
The content of the actual CMake file doesn't seem to matter, so I'm heavily leaning on something not being correctly configured.
I've tried messing with the toolchain to no avail. Any ideas?
I figured it out in the end.
This is the process I went through. Initially I assumed I had some how not configured the compiler toolchain correctly, so to rule that out I switched to the MinGW GNU toolchain gcc/gdb.
The issue persisted, so that left only two real possibility. CMake was broken or the CMake Generator wasn't correctly configured. Ignoring the first for sanity reasons that left the generator.
I tried switching through a few of the provided options, obviously I didn't have any of them installed. But finally one gave me a reasonable error, that Qt Creator couldn't find it. (I switched to ninja from nmake).
I installed it, and added it to the OS PATH environment variable; so Qt Creator could find it. (Windows 10: Control Panel > System > Advanced system settings (sidebar) > Environment Variables + Set Path > OK)
(Linux: add export PATH="${PATH}": to something like your bashrc). Probably wouldn't be an issue on Linux unless you installed the program from source.
Anyway, that was frustrating. Setting up a new development environment sucks.

Cannot build LLVM on Windows 10 using Visual Studio 2015

I'm trying to install LLVM on Windows 10 using Visual Studio, using the guide http://llvm.org/docs/GettingStartedVS.html, but I'm getting errors:
Here is my view in CMake GUI, where I've directed it to use the C++ compiler C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe.
I've already created a new directory called llvm for the build, since I cannot build in the source directory.
What am I doing wrong?
The configure process displays the following output:
The C compiler identification is unknown
The CXX compiler identification is unknown
The ASM compiler identification is MSVC
Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
CMake Error at CMakeLists.txt:48 (project):
No CMAKE_C_COMPILER could be found.
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
CMake Error: Generator: execution of make failed. Make command was: "MSBuild.exe" "cmTC_c88f4.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/dev/llvm/CMakeFiles/CMakeTmp
Run Build Command:"MSBuild.exe" "cmTC_c88f4.vcxproj"
"/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Generator: execution of make failed. Make command was: "MSBuild.exe"
"cmTC_c88f4.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:48 (project)
Configuring incomplete, errors occurred!
See also "C:/dev/llvm/CMakeFiles/CMakeOutput.log".
See also "C:/dev/llvm/CMakeFiles/CMakeError.log".
I am working with your same setup(exception being Windows 32-bit), the LLVM version I have chosen is 4.0.0. I followed the tutorial for setting it up with clang.
I made notes for my entire process.
Instructions for building LLVM 4.0.0 from source:
Create a folder named LLVM in any suitable location.
cd LLVM
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd .... # going back to where you started
mkdir build
cd build
cmake -G "Visual Studio 14" ..\llvm ##depends on the version of VS you use, I used VS 2015 -> VISUAL STUDIO 14.0
If successful, in the build directory you will find LLVM.sln file which can be opened in Visual Studio, once opened, you can navigate through the solution explorer and right click the ALL_BUILD project -> Build.
Notes:
I'm using Visual Studio 2015 (Update 3)
I'm using Windows 10 32-bit system
Header files dependencies can be fixed by appending paths to the files where it can be found in the Visual Studio 14.0 folder in Program Files.
My environment variables for reference:
**INCLUDE=C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files\Windows Kits\10\include\10.0.10240.0\ucrt;C:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files\Windows Kits\8.1\include\shared;C:\Program Files\Windows Kits\8.1\include\um;C:\Program Files\Windows Kits\8.1\include\winrt;
**LIBPATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files\Microsoft Visual Studio 14.0\VC\LIB;C:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB;C:\Program Files\Windows Kits\8.1\References\CommonConfiguration\Neutral;\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;
Set the PATH enviroment variable for llvm tools like clang, llc, lli, etc., if they're not recognized on developer command prompt.
You may also find executables like clang and clang++ missing from the build when downloading from the github. I copied these from the prebuilt binaries which I had downloaded for windows which can be found on the LLVM releases page.
Hope this helps!