Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Link error, module machine type conflicts with target machine type?

1,096 views
Skip to first unread message

Ted

unread,
Apr 18, 2008, 10:11:40 AM4/18/08
to
Hi!

I hope I am not posting to the wrong group (in that case please tell me
which group is correct.) I would be most grateful if someone could help me
with this.

I am trying to convert my mfc code, which is an in-proc COM server, to x64.

After fixing numerous errors I am stuck with this one. The error I am
receiving is

Linking...
Starting pass 1
.\x64\Unicode Debug\Registry.obj : fatal error LNK1112: module machine type
'X86' conflicts with target machine type 'x64'

Obviously something is still set to x86, but how can I tell what? Registry
is one of my own classes, part of this project.

Where should I look?

Here are the link parameters:

/OUT:"x64\Unicode Debug\Callander.ADUC.Extension.dll" /INCREMENTAL /NOLOGO
/LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\x64" /DLL
/MANIFEST:NO /DEF:"AducExtension.def" /DEBUG /PDB:"x64\Unicode
Debug\AducExtension.pdb" /IMPLIB:"x64\Unicode Debug\AducExtension.lib"
/MACHINE:X64 /ERRORREPORT:PROMPT activeds.lib adsiid.lib dsprop.lib


Thanks
// Ted

David Lowndes

unread,
Apr 18, 2008, 3:17:47 PM4/18/08
to
>After fixing numerous errors I am stuck with this one. The error I am
>receiving is
>
>Linking...
>Starting pass 1
>.\x64\Unicode Debug\Registry.obj : fatal error LNK1112: module machine type
>'X86' conflicts with target machine type 'x64'
>
>Obviously something is still set to x86, but how can I tell what?

This came up a few weeks ago. I don't know if it's perhaps the
same/similar to your issue:

http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/c0dabfeb90142cee/69ea007708f5f315?hl=en&lnk=st&q=LNK1112+x64+x86#69ea007708f5f315

Dave

Ted

unread,
Apr 18, 2008, 7:04:09 PM4/18/08
to
Hi David

Thanks for replying. That was a similar error but not the same. In my case
it was the other way around - compiler generates x86 and the linker chokes
on it.

However this led me to look closer at the compiler options, and after
turning /nologo off, it became (embarrassingly) clear what happens:

1>------ Build started: Project: Test x64, Configuration: Release x64 ------
1>Compiling...
1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for
80x86

I was simply assuming that if I didn't have the 64 bit compiler installed,
the option to build x64 target would not be present in the GUI. But no no
no... I had to run visual studio Setup in order to see that the 64 bit
checkbox was cleared. :)

Problem solved.

"David Lowndes" <Dav...@example.invalid> skrev i meddelandet
news:2rsh0416gfd364eae...@4ax.com...

0 new messages