patriciogonzalezvivo / ada_example

Simple example of an ADA program
6 stars 0 forks source link

Windows 10 error on compiling ... VS 2022 #2

Open moebiussurfing opened 2 years ago

moebiussurfing commented 2 years ago

I am getting this error on the last step from https://github.com/patriciogonzalezvivo/ada... (I had cmake installed but not ugin scoop)

PS E:\ada\ada_example\build> cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044.
-- The CXX compiler identification is MSVC 19.32.31329.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at deps/CMakeLists.txt:1 (add_subdirectory):
  The source directory

    E:/ada/ada_example/deps/ada

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:12 (target_compile_definitions):
  Cannot specify compile definitions for target "ada" which is not built by
  this project.

-- Configuring incomplete, errors occurred!
See also "E:/ada/ada_example/build/CMakeFiles/CMakeOutput.log".

CMakeOutput.log

The system is: Windows - 10.0.19044 - AMD64
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 09/06/2022 23:08:12.
Project "E:\ada\ada_example\build\CMakeFiles\3.23.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
  CMakeCXXCompilerId.cpp
Link:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
  CompilerIdCXX.vcxproj -> E:\ada\ada_example\build\CMakeFiles\3.23.2\CompilerIdCXX\CompilerIdCXX.exe
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_CXX_COMPILER=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\cl.exe
FinalizeBuildStatus:
  Deleting file "Debug\CompilerIdCXX.tlog\unsuccessfulbuild".
  Touching "Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate".
Done Building Project "E:\ada\ada_example\build\CMakeFiles\3.23.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.79

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe"

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj"

The CXX compiler identification is MSVC, found in "E:/ada/ada_example/build/CMakeFiles/3.23.2/CompilerIdCXX/CompilerIdCXX.exe"

Detecting CXX compiler ABI info compiled with the following output:
Change Dir: E:/ada/ada_example/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_1233a.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31329 for x64

  CMakeCXXCompilerABI.cpp

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_1233a.dir\Debug\\" /Fd"cmTC_1233a.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "C:\Program Files\CMake\share\cmake-3.23\Modules\CMakeCXXCompilerABI.cpp"

  cmTC_1233a.vcxproj -> E:\ada\ada_example\build\CMakeFiles\CMakeTmp\Debug\cmTC_1233a.exe

Any idea?

patriciogonzalezvivo commented 2 years ago

Hi! seams you don't have ada submodule. You can clone it again with this command

git clone --recursive https://github.com/patriciogonzalezvivo/ada_example.git

or initialize the submodule

git submodule init
git submodule update
moebiussurfing commented 2 years ago

Thanks for the replies. I forgot the submodules. And I had to add my ssh keys from GitHub manually too.

Now it stuck on the last step we calling "make" after "cmake ..":

PS E:\ada\ada_example\build> cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044.
-- The CXX compiler identification is MSVC 19.32.31329.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is MSVC 19.32.31329.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Including Win32 support
-- Found OpenGL: opengl32
-- OPENGL_LIBRARIES: opengl32;glu32
-- OPENGL_opengl_LIBRARY:
CMake Deprecation Warning at deps/ada/deps/glew/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Could NOT find FFMPEG (missing: FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS)
-- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "1.8.0")
-- Checking for modules 'libavdevice;libavfilter;libavformat;libavcodec;libswresample;libswscale;libavutil'
--   Found libavdevice, version 58.13.100
--   Found libavfilter, version 7.110.100
--   Found libavformat, version 58.76.100
--   Found libavcodec, version 58.134.100
--   Found libswresample, version 3.9.100
--   Found libswscale, version 5.9.100
--   Found libavutil, version 56.70.100
-- LIBAV Supported
-- USING GLFW DRIVERS
-- PLATFORM WINDOWS
-- Configuring done
-- Generating done
-- Build files have been written to: E:/ada/ada_example/build
PS E:\ada\ada_example\build> dir

    Directory: E:\ada\ada_example\build

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        11/06/2022      0:22                CMakeFiles
d-----        11/06/2022      0:22                deps
d-----        11/06/2022      0:22                wasm
-a----        11/06/2022      0:22          37192 ALL_BUILD.vcxproj
-a----        11/06/2022      0:22            273 ALL_BUILD.vcxproj.filters
-a----        11/06/2022      0:22          55398 CMakeCache.txt
-a----        11/06/2022      0:22           1590 cmake_install.cmake
-a----        11/06/2022      0:22          15885 hello_world.sln
-a----        11/06/2022      0:22          54106 hello_world.vcxproj
-a----        11/06/2022      0:22            553 hello_world.vcxproj.filters
-a----        11/06/2022      0:22          10062 INSTALL.vcxproj
-a----        11/06/2022      0:22            515 INSTALL.vcxproj.filters
-a----        09/06/2022     22:28          53304 new_media.ttf
-a----        11/06/2022      0:22          53605 ZERO_CHECK.vcxproj
-a----        11/06/2022      0:22            516 ZERO_CHECK.vcxproj.filters

PS E:\ada\ada_example\build> make
make: *** No targets specified and no makefile found.  Stop.

It creates some VS Studio projects too, but I don't know if it can be opened or not...

image

patriciogonzalezvivo commented 2 years ago

That's because you are in windows : ) Please follow this instructions for glslViewer as a guideline https://github.com/patriciogonzalezvivo/glslViewer/wiki/Compile-on-Windows