Comments (11)
This is literally all I ever do to build it:
SET DETOURS_TARGET_PROCESSOR=X64
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
NMAKE
from detours.
I may be stupid then, I'll try this when I wake up in the morning
from detours.
OK never-mind my curiosity got the better of me.
https://pastebin.com/dNsuw1S8
Still getting same error, could it be I am using the community Visual Studio and you're using Enterprise?
from detours.
Possibly but I wouldn't think so for this basic compiling and linking. Possibly a different SDK version. Did you try from a clean, unzipped copy of the Detours source? I've had issue when building the x64 libraries in the same directory I've used for x86. You can also do 'nmake clean'.
One side note: if it's getting as far as linking the example binaries, the core library files are already built -- and that's really what most people need.
from detours.
Yes, I downloaded it fresh when you commented on my laptop which has Win10 1803 on it, C++ tools and all, I don't know what's going on, I'll try it at work and see if we have access to Enterprise licences and try again.
from detours.
Installed Enterprise, same issue. I might install XP support it could be something stupid like that knowing how MS sometimes works ;), if not I'll report back even more confused.
For reference what do you have installed for VS?
from detours.
I just have the '.NET desktop development' and 'Desktop development with C++' workloads installed.
from detours.
Then I'm out of ideas, I've got the same but doesn't work for me.
from detours.
The same problem: setting DETOURS_TARGET_PROCESSOR=x64 just puts binaries in x64 folder but the .lib file seems to be created by x86 compiler.
When I try to use it I get
1>k:\Detours\Detours-master\lib.X64\detours.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
from detours.
VS2017 comes with several command shell prompts. The default one Developer Command Prompt for VS2017
invokes the x86-targeting compiler. Try using the x64 Native Tools Command Prompt for VS2017
shell instead. This should invoke the x64-targeting compiler. I'm assuming that you have a 64-bit version of Windows installed. If not, you'll need to use the x86_64 Cross Tools Command Prompt for VS2017
.
Each VC++ compiler binary only supports one target, so you have to make sure that you are invoking the right one. This is different than clang, for example, which is built as a cross-compiler that supports multiple target architectures.
The error message from the pastebin log shows that the wrong compiler is being invoked:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.EXE
At the end of path HostX86
means that the compiler is hosted on x86. The following subdirectory x86
means that the compiler is targeting x86 too.
from detours.
Oh I feel stupid, I didn't even see that in the error message.
That solved it. Thank you!
from detours.
Related Issues (20)
- This repo is missing important files HOT 6
- NMAKE failing at the end. HOT 4
- NMAKE failed HOT 1
- Windows 11 ARM64 Processor x86, x64 COM API Hook Crash.
- `detour_skip_jmp` for x64 doesn't support `rex.w` prefix
- Wiki is missing sample tracessl
- `detour_skip_jmp` for arm64 doesn't support unconditional branch HOT 1
- `detour_sign_extend` is implemented incorrectly
- Noting the Optimizations greatly influence the result
- return value of 'main()'
- Calling DetourCreateProcessWithDllsW crashes .NET applications compiled for Any-CPU
- Hook unexported functions HOT 5
- Hooking inline function HOT 1
- Incorrect Behaviour: Arm64 CopyLdrLiteral for non-SIMD inlines Pointer Read
- Incorrect Behaviour: Arm64 CopyLdrLiteral rewrites Prefetch as Memory Read, which can Trash a Potentially Used Register
- <BUG>crash on jmp addr? HOT 1
- contains invalid OMF record, type 0x21 (possibly COFF) HOT 3
- Unable to hook winsock2 recv() HOT 1
- Is it possible to unload a user DLL from a process created by the DetourCreateProcessWithDllEx function? HOT 1
- Can I call a function from Exe in the injected function of the dll ? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detours.