
- #D3dx11 could not create device game error anyfix mad max c how to
- #D3dx11 could not create device game error anyfix mad max c code
CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc //Flags used by the CXX compiler during DEBUG builds.

CMAKE_COLOR_MAKEFILE:BOOL=ON //CXX compiler CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/0/bin/Hostx86/x86/cl.exe //Flags used by the CXX compiler during all build types. CMAKE_BUILD_TYPE:STRING=Debug //Enable/Disable color output during build. # EXTERNAL cache entries # //Choose the type of build, options are: None Debug Release RelWithDebInfo // MinSizeRel. # VALUE is the current value for the KEY. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # If you do want to change a value, simply edit, save, and exit the editor. # If you do not want to change any of the values, simply exit the editor. # For build in directory: e:/Projects/TestProject/Debug # It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe # You can edit this file to change values found and used by cmake. This is the generated CMakeCache # This is the CMakeCache file. Set_target_properties ($ "C:/Program Files (x86)/Microsoft DirectX SDK/Lib/x86/d3dx11.lib")

#set(CMAKE_CXX_FLAGS -G"NMake Makefiles")Īdd_executable(TestProject Source/main.cpp ) #set(CMAKE_GENERATOR "NMake Makefiles" CACHE INTERNAL "" FORCE)ĪDD_DEFINITIONS(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) Thanks cmake_minimum_required(VERSION 3.13.0) Im assuming that since its failing at the linker stage, its finding all the headers correctly, The same project also builds with Visual Studio without issues, but I am trying to build with NMake The path for the library exists and the library is there: C:/Program Files (x86)/Microsoft DirectX SDK/Lib/x86 Maybe something is out of order or written incorrectly. But this is not an undefined reference error
#D3dx11 could not create device game error anyfix mad max c code
When I'm building the project in visual studio, it uses /MT code generation, I know that if these are incompatible with library it will get underlined reference errors. I see it's right there in the linker command line, why can't it open? What does it mean when it says it cannot Open the lib file? Does it mean it's found but cannot be opened? Or that its not found? LINK : fatal error LNK1104: cannot open file 'd3dx10.lib' LINK Pass 1: command "C:\PROGRA~2\MIB055~1\2019\ENTERP~1\VC\Tools\MSVC\1425~1.286\bin\Hostx86\x86\link.exe /nologo u/CMakeFiles\example.dir\objects1.rsp /out:example.exe /implib:example.lib /pdb:E:\Projects\example\Debug\example.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console C:\Program Files (x86)\Microsoft DirectX SDK\Lib\x86\d3dx11.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\example.dir/intermediate.manifest CMakeFiles\example.dir/manifest.res" failed (exit code 1104) with the following output: I tried all of these optiosn, still getting the same error: Maybe the path doesn't need spaces, maybe Im supposed to have the library with a lib prefix, maybe Im not supposed to put the extension. The problem is I don't understand what CMake wants. I cannot keep trying to figure this out on my own anymore, I tried using target_link_library, add_library, find library, you name it, it's in the CMakeLists.txt below I made posts on stackoverflow but received no answers.
#D3dx11 could not create device game error anyfix mad max c how to
I spent 3 days trying to figure out how to including the library in CMake, each time I build it gives me the same error.

However, the project requires d3dx11.lib and I cannot seem to get it to build, it fails at the linker stage I'm learning how to use CMake by making a basic CMakeLists.txt file without macros and targetting x86 only
