Git Product home page Git Product logo

Comments (11)

NoMoreFood avatar NoMoreFood commented on June 24, 2024 1

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.

Arefu avatar Arefu commented on June 24, 2024

I may be stupid then, I'll try this when I wake up in the morning

from detours.

Arefu avatar Arefu commented on June 24, 2024

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.

NoMoreFood avatar NoMoreFood commented on June 24, 2024

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.

Arefu avatar Arefu commented on June 24, 2024

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.

Arefu avatar Arefu commented on June 24, 2024

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.

NoMoreFood avatar NoMoreFood commented on June 24, 2024

I just have the '.NET desktop development' and 'Desktop development with C++' workloads installed.

from detours.

Arefu avatar Arefu commented on June 24, 2024

Then I'm out of ideas, I've got the same but doesn't work for me.

from detours.

RomanKhv avatar RomanKhv commented on June 24, 2024

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.

dtarditi avatar dtarditi commented on June 24, 2024

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.

Arefu avatar Arefu commented on June 24, 2024

Oh I feel stupid, I didn't even see that in the error message.

That solved it. Thank you!

from detours.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.