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. 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 ![]() I see it's right there in the linker command line, wtf 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 usin target_link_library, add_library, find library, you name it, it's in the CMakeLists.txt below I made several posts on stackoverflow but received no answers. See this post for details.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. Therefore, you go with the old-school include order. If you are specifically targeting to run a program on Windows XP SP3 with Direct3D 9, you'll be using the v140_xp Platform Toolset which uses the Windows 7.1A SDK, not the Windows 8.1 SDK. Using DirectX 11 with one of the modern replacements for D3DX is a better, cleaner option and doesn't require the legacy DirectX SDK. With all that said, you probably shouldn't be using legacy Direct3D 9 anyhow. See MSDN, Where is the DirectX SDK (2015 Edition)?, The Zombie DirectX SDK, and Not So Direct Setup. With VS 2012 or later, you have to reverse them since most of the headers in the Windows 8 SDK replace the older DirectX SDK: $(ExecutablePath) $(DXSDK_DIR)Utilities\bin\x86Īnd $(ExecutablePath) $(DXSDK_DIR)Utilities\bin\圆4 $(DXSDK_DIR)Utilities\bin\x86 With VS 2010, the VC Directory settings you were supposed to use were as follows for Win32 (x86) settings: $(DXSDK_DIR)Utilities\bin\x86 $(ExecutablePath)Īnd this for 圆4 native: $(DXSDK_DIR)Utilities\bin\圆4 $(DXSDK_DIR)Utilities\bin\x86 $(ExecutablePath) The Windows 8.1 SDK includes all the DirectX headers and libraries, but does not contain the now deprecated D3DX (D3DX9, D3DX10, D3DX11) utility library which is why it is "missing".ĭ3DX9, D3DX10, and D3DX11 are only available in the legacy DirectX SDK. Visual Studio 2015 includes the Windows 8.1 SDK which is newer than the headers in the legacy DirectX SDK.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |