Cannot compile any version with Visual Studio 2017 Enterprise
jx432 opened this issue · 4 comments
Hi, I'm not able to compile Indicium-Supra 1.1 with Visual Studio 2017 Enterprise. I keep getting error
Error C2220 warning treated as error - no 'object' file generated Indicium-Supra c:\program files (x86)\microsoft sdks\windows\v7.1a\include\shlobj.h 1151
I already went to Configuration Properties -> C/C++ -> General
Turn Off All Warnings /W0
Treat Warnings As Error No (/WX-)
And I am still getting the error.
I then tried to compile the newest version from the Master branch and I got countless errors. Even after installing boost and minhook.
I did manage to get the debug version of Indicium-Supra 1.1 to compile but it doesn't seem to work with Windows 10. Here is the full log:
[2018-07-17 23:29:01.026093]: Library loaded, attempting to launch main thread
[2018-07-17 23:29:01.027090]: Main thread created successfully
[2018-07-17 23:29:01.028087]: Initializing DLL injection
[2018-07-17 23:29:01.028087]: Searching for target process by process name: swtor.exe
[2018-07-17 23:29:01.032077]: Target PID: 10692
[2018-07-17 23:29:01.032077]: Opened target process [HANDLE: 000001BC]
[2018-07-17 23:29:01.040055]: Allocated memory [ADDR: 0E990000]
[2018-07-17 23:29:01.040055]: Wrote DLL path (C:\Users\mille\Desktop\Indicium-Supra.dll) to target process memory
[2018-07-17 23:29:01.040055]: Calling LoadLibraryA(C:\Users\mille\Desktop\Indicium-Supra.dll) in target process
[2018-07-17 23:29:01.043047]: Library loaded successfully
[2018-07-17 23:29:01.044045]: Library enabled successfully
[2018-07-17 23:29:01.058008]: Library loaded into \Device\HarddiskVolume4\Users\mille\Desktop\hello_world.exe
[2018-07-17 23:29:01.058008]: Library enabled
[2018-07-17 23:29:01.060002]: Acquiring VTable for Direct3DCreate9...
[2018-07-17 23:29:01.060002]: Could not get the handle to d3d9.dll
[2018-07-17 23:29:01.060002]: Couldn't get VTable for Direct3DCreate9
[2018-07-17 23:29:01.060002]: Releasing temporary objects
[2018-07-17 23:29:01.061000]: Acquiring VTable for Direct3DCreate9Ex...
[2018-07-17 23:29:01.061000]: Could not get the handle to d3d9.dll
[2018-07-17 23:29:01.061000]: Couldn't get VTable for Direct3DCreate9Ex
[2018-07-17 23:29:01.061000]: Releasing temporary objects
[2018-07-17 23:29:01.061997]: Acquiring VTable for ID3D10Device and IDXGISwapChain...
[2018-07-17 23:29:01.061997]: Couldn't get handle to DXGI.dll
[2018-07-17 23:29:01.062995]: Couldn't get VTable for IDXGISwapChain
[2018-07-17 23:29:01.062995]: Releasing temporary objects
[2018-07-17 23:29:01.063992]: Acquiring VTable for ID3D11Device and IDXGISwapChain...
[2018-07-17 23:29:01.063992]: Couldn't get handle to DXGI.dll
[2018-07-17 23:29:01.063992]: Couldn't get VTable for IDXGISwapChain
[2018-07-17 23:29:01.063992]: Releasing temporary objects
[2018-07-17 23:29:01.064990]: Acquiring VTable for IDirectInputDevice8...
[2018-07-17 23:29:01.107874]: Enumerating devices
[2018-07-17 23:29:01.175200]: No joystick device found
[2018-07-17 23:29:01.175200]: Couldn't get VTable for DirectInput8
[2018-07-17 23:29:01.175200]: Releasing temporary objects
[2018-07-17 23:29:01.175200]: Initializing hook engine...
[2018-07-17 23:29:01.175200]: Hook engine initialized
[2018-07-17 23:29:01.175200]: Hooking USER32!DefWindowProcA (ANSI)
[2018-07-17 23:29:01.175200]: Hooking USER32!DefWindowProcW (Unicode)
[2018-07-17 23:29:01.195147]: DefWindowProc hooked
I'm not sure why but the project is 100% bugged. According to the log GetModuleHandle isn't even working. Are you sure this library works on machines running windows 10?
By the way, swtor is a directx 9 game GetModuleHandle("d3d9.dll") should be working.
I am just trying to make a basic overlay but compiling the source code is a pain. Can you please compile v1.1.0 and send me the dll?
The project isn't "a 100% bugged", it compiles fine on two of my machines and the AppVeyor CI environment so I'd make the bold claim that the issue is at your end.
The library has been tested in multiple scenarios, mainly including Windows 10.
The project doesn't use boost so IDK why you thought you need it.
There's even a link in the README to built binaries, not that hard to spot. Therefore; no, I won't build it for you. Fix your environment and tone down the blaming and bitching a bit, thank you.
And why in the world are you building v1.1? That tag is over two years old, build the master/HEAD.
I am trying to build v1.1 because I can't get the newest version to compile. Here are the steps I took to compile the newest version from master. I am new to developing overlays in C/C++ so forgive me if I did something wrong.
- I opened NuGet Package Manager and installed nefarius.poco-basic-windows-v150
- I compiled MinHooks source code
- I put MinHook.h in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include
- I went to Configuration Properties -> Linker -> Input and added libMinHook.x86.lib and MinHook.x86.lib as an additional dependency.
I am getting this error:
Error LNK2019 unresolved external symbol _MH_Initialize@0 referenced in function "void __cdecl IndiciumMainThread(void *)" (?IndiciumMainThread@@YAXPAX@Z) Indicium-Supra C:\Users\mille\Desktop\Indicium-Supra-master\src\Indicium-Supra\Game.obj 1
Shouldn't that error vanish when I add libMinHook.x86.lib and MinHook.x86.lib as an additional dependency? I can get rid of that error by installing MinHook's Nuget package but then the compiler throws a different error. " The object or library file libMinHook.lib was created with an older compiler than other objects, rebuild old objects and libraries." I already tried to rebuild old objects and libraries and I'm still getting the error. What am I doing wrong?
EDIT: Nvm I finally got it to compile without errors. I had to reinstall Visual Studio 2017.
I was not trying to blame you, nefarius. I meant that the project was bugged for me only.