Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Seem To Make x64? #5

Closed
Arefu opened this issue May 9, 2018 · 11 comments
Closed

Can't Seem To Make x64? #5

Arefu opened this issue May 9, 2018 · 11 comments

Comments

@Arefu
Copy link

Arefu commented May 9, 2018

Hey Peeps,

I have VS2017 installed latest updates with the C++ tools installed.
I might be missing dependencies however when I open up the Developer Command Prompt and make the project it compiles fine for x86. I did try make all and it certainly tries but when it gets to x64 it seems to error out on:
iping_d.obj : error LNK2001: unresolved external symbol _iping_ProxyFileInfo
Would I be able to get any advice on this why it pops up when making for x64 and not x86 or am I being so stupid I'm not seeing what is wrong.

@NoMoreFood
Copy link

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

@Arefu
Copy link
Author

Arefu commented May 22, 2018

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

@Arefu
Copy link
Author

Arefu commented May 22, 2018

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?

@NoMoreFood
Copy link

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.

@Arefu
Copy link
Author

Arefu commented May 23, 2018

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.

@Arefu
Copy link
Author

Arefu commented May 24, 2018

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?

@NoMoreFood
Copy link

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

@Arefu
Copy link
Author

Arefu commented May 24, 2018

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

@RomanKhv
Copy link

RomanKhv commented May 28, 2018

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'

@dtarditi
Copy link
Contributor

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.

@Arefu
Copy link
Author

Arefu commented May 29, 2018

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

That solved it. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants