<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>[CONNECT C++] Fatal link error: module machine type &amp;#39;x64&amp;#39; conflicts with target machine type &amp;#39;x86&amp;#39;</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86</link><description>Hi all - 
 I&amp;#39;ve been banging away at converting code over from v8i MDL code to C++ native DLL and have (most) of it compiling without error. I&amp;#39;ve decided I need to get a portion of the code working to make sure I&amp;#39;m on the right track. So before I start</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/731340?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 18:33:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:674c9d3a-e77a-4f70-9810-f27b6575bfa3</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/cd8c72aa_2d00_0f53_2d00_4a59_2d00_9546_2d00_7ba0404d4a30"&gt;Gary Shay&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Glad you find build.bat to be a helpful troubleshooting tool and hear you are making progress in both the development shell build and migration progress.&amp;nbsp; I would like to point out another migration&amp;nbsp;tip or two that may help you navigate the SDK resources efficiently wrt a migration set of eyes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In your CPP modules, comment out all includes and start by only including: &amp;lt;&lt;strong&gt;Mstn\MdlApi\MdlApi.h&lt;/strong&gt;&amp;gt;. MdlApi.h is essentially the V8 era equivalent of the old msvar.fdf that would include the most common &amp;quot;high-level&amp;quot; includes (fdfs and where needed .h files) to help reduce the amount of time searching for dependent header files for missing definitions. Of course you will require additional includes (.fdf and/or .h) but using the tools below can help quickly ensure only the correct list of dependencies is identified vs. some headers that should not be included like .r.h (hence the new file extension).&lt;/li&gt;
&lt;li&gt;The SDK provides a couple convenience scripts and macros to help navigate and display information you need during migration (in the proper locations and order from a developers perspective), so try using these convenient ways to interrogate our SDK using &lt;a href="/products/programming/microstation_programming/w/wiki/60667/sdksearch" rel="noopener noreferrer" target="_blank"&gt;SDKSearch&lt;/a&gt; and &lt;a href="/products/programming/microstation_programming/w/wiki/46936/sdktips-and-sdkmacros" rel="noopener noreferrer" target="_blank"&gt;SDKMacros&lt;/a&gt; available:&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/60667/sdksearch" rel="noopener noreferrer" target="_blank"&gt;SDKSEARCH&lt;/a&gt; SearchTerm&lt;/em&gt;&lt;/strong&gt; - this script will dive down: migration remap file(s),&lt;span&gt;&amp;nbsp;examples, includes, binary libraries, the current (your) source code folder, and even (MicroStation) product paths (text and binaries); listing potential matches found to use, reference or explore in more detail. After sdksearch exhausts local resources (think I have done my homework), it then askes a simple Y/N if you want to look on the SDK&amp;#39;s respective online Bentley Community listing the most recent SearchTerm hits first; in case there are &amp;quot;known issues&amp;quot; or &amp;quot;best code snips/recommendations&amp;quot; to save you additional time and effort otherwise lost.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;em&gt;&lt;strong&gt;qs SearchTerm&lt;/strong&gt;&lt;/em&gt; - a recent macro added to provide targeted quick searches (qs) of only examples, includes and remap files&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;strong&gt;&lt;em&gt;sd SearchTerm&lt;/em&gt;&lt;/strong&gt; - a recent macro added to provide targeted searches (for) definitions (sd).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;My goal with the environment and SDK tools is to provide you with the same tools and techniques I use to provide convenient, quick, correct and helpful information for any given topic (searchterm).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Good luck and HTH,&lt;br /&gt;Bob&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/731319?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 16:53:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:fd35c64a-7ab9-481d-8152-4d48bf03ba85</guid><dc:creator>Gary Shay</dc:creator><description>&lt;p&gt;All,&lt;/p&gt;
&lt;p&gt;Thank you so much for all your help.&amp;nbsp; I have (qualified) good news on this request, see below.&amp;nbsp; I&amp;#39;ve been hesitating adding this update while I worked through a few remaining issues, mostly because I&amp;#39;m not doing very well migrating it, mostly because I continue to struggle finding information that I think I should be able to find, but I&amp;#39;ve just not got the hang of it yet.&lt;/p&gt;
&lt;p&gt;So I think I&amp;#39;ve been able to get past the x64 conflict, and I&amp;#39;ve still got some weird linkage issues around MSTXTFIL.H routines for mdlTextFile_XXX functions.&amp;nbsp; It appears that I&amp;#39;m doing what I should, but the link is failing to find the mdlTextFile_xxx routines.&amp;nbsp;&lt;strong&gt; For the time being, I&amp;#39;m going to mark an answer to this issue&lt;/strong&gt; and follow up separately for the mdlTextFile_xxx problem if I can&amp;#39;t find what I need.&amp;nbsp; It&amp;#39;s incredibly frustrating to not have things where I think they should be, but that&amp;#39;s not the documentation or the SDK&amp;#39;s problem, I don&amp;#39;t think.&lt;/p&gt;
&lt;p&gt;So thanks for all the help, I&amp;#39;m continuing to plug away at this.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Resolution:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I took the Dialog Box example MKE file and modified it to compile all the files and configure the linker.&amp;nbsp; In that MKE, it also uses a resource MKI file that I copied.&lt;/p&gt;
&lt;p&gt;Comparing the old MKE to the updated one, I had several issues where object file locations are different.&amp;nbsp; The linker MKI redefines the $(o) and looks for the obj files in a different location than I was putting them - the old MKE did all that &amp;#39;manually&amp;#39; and was telling it to go someplace else.&lt;/p&gt;
&lt;p&gt;Probably one of the biggest helps was&amp;nbsp;&lt;strong&gt;build verbose&lt;/strong&gt;.&amp;nbsp; It really does give a LOT of information, but it definitely told me where the issue was occurring.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;G&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729903?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 06:39:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:14c06dfe-79dc-4f9f-bf81-253dd27bfb67</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Gary,&lt;/p&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729732"] it still defines and calls the linker manually.&amp;nbsp; From what I&amp;#39;ve read, that&amp;#39;s no longer necessary[/quote]
&lt;p&gt;As far as I remember, it was never necessary, because mke / mki files exist always, from the time MDL was invented and added to MicroStation V4 (I think official SDK was released in 4.0.3 ;-)&lt;/p&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729732"]and this is using additional files that are no longer required.[/quote]
&lt;p&gt;I recommend to start from scratch and to add, step by step, definitions (macros and conditions) that are required to solve error messages. My experience is that nearly every time, when something is added as &amp;quot;extra&amp;quot;, at the end it is wrong, because it breaks something or the functionality is already available somewhere in mki files.&lt;/p&gt;
&lt;p&gt;Follow Jon&amp;#39;s advice and check how makefiles of SDK examples are written. DLM_* definitions are typically the only mandatory definitions (in addition to definition of compiled files of course).&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729753?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2022 16:02:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:057fe098-d01b-40aa-992e-3897de3041e2</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729732"]This make file is old enough that it still defines and calls the linker manually[/quote]
&lt;p&gt;Examine the delivered examples.&amp;nbsp; They typically define these macros...&lt;/p&gt;
&lt;pre&gt;#------------------------------------------------
#   Set up to use dlmcomp.mki and dlmlink.mki
#------------------------------------------------
dlmObjs = \
    $(o)$(appName)$(oext) 
 
DLM_NAME                = $(appName)
DLM_DEST                = $(mdlapps)
DLM_OBJECT_FILES        = $(dlmObjs)
DLM_OBJECT_DEST         = $(o)
DLM_SPECIAL_LINKOPT     = -fixed:no     # Notify linker this library does not require a fixed base address to load
DLM_NO_DLS              = 1             # USE DLLEXPORT IN .CPP
DLM_NO_DEF              = 1
DLM_NOENTRY             = 1
DLM_NO_MANIFEST         = 1             # If not set linker embeds your current (developer) patched MSVCRT version manifest in output dll.  This is not desirable and produces side-by-side CLIENT ERROR: 14001)
DLM_NO_SIGN             = 1             # If not set and no certificate found, ERROR: &amp;#39;singleton&amp;#39; is not recognized as an internal or external command
LINKER_LIBRARIES        = $(mdlLibs)bentley.lib \
                          $(mdlLibs)mdlbltin.lib \
                          $(mdlLibs)BentleyGeom.lib \
                          $(mdlLibs)DgnPlatform.lib \
                          $(mdlLibs)dgnview.lib \
                          $(mdlLibs)RmgrTools.lib
&lt;/pre&gt;
&lt;p&gt;Then invoke the linker like this...&lt;/p&gt;
&lt;pre&gt;%include $(MDLMKI)dlmlink.mki&lt;/pre&gt;
&lt;p&gt;Macro &lt;code&gt;dlmObjs&lt;/code&gt; is a list of compiled objects (&lt;code&gt;*.obj&lt;/code&gt;) that feed into the linker.&lt;/p&gt;
&lt;p&gt;In contrast to many include files, &lt;code&gt;dlmlink.mki&lt;/code&gt; is full of comments.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729732?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2022 14:39:09 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:96c9b738-162f-48d6-9bb9-fcaf263e6fa4</guid><dc:creator>Gary Shay</dc:creator><description>&lt;p&gt;Jan -&lt;/p&gt;
&lt;p&gt;This make file is old enough that it still defines and calls the linker manually.&amp;nbsp; From what I&amp;#39;ve read, that&amp;#39;s no longer necessary, and this is using additional files that are no longer required.&amp;nbsp; Still working on it!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729725?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2022 14:16:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7944332b-e649-490b-8ccc-609b185aac15</guid><dc:creator>Gary Shay</dc:creator><description>&lt;p&gt;Sorry for the delay in replying. Had a production issue that I was pulled into.&lt;/p&gt;
&lt;p&gt;Ok - the Developer Shell startup script does not give me the same [SDK Environment] parts you show. It does display the following by default:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[SDK Environment]

MS=C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\
MSMDE=C:\PROGRA~1\Bentley\MICROS~2\
MSMDE_OUTPUT=C:\Users\SHAYGE\AppData\Local\Temp\Bentley\MicroStationSDK\

Path=C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\PROGRA~2\MIB055~1\2017\PROFES~1\MSBuild\15.0\bin\Roslyn;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\PROGRA~2\MIB055~1\2017\PROFES~1\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\Tools\;C:\PROGRA~1\Bentley\MICROS~2\bin;C:\PROGRA~1\Bentley\MICROS~2\library;C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\SHAYGE\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\SHAYGE\AppData\Local\Microsoft\WindowsApps;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\PROGRA~2\MIB055~1\2017\PROFES~1\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\PROGRA~1\Bentley\MICROS~2\bin\;C:\PROGRA~1\Bentley\MICROS~2\MigrationTools\;C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So I looked at what&amp;#39;s set to get the additional items you showed (just for comparison) and it looks like they&amp;#39;re all similar enough to suggest that the environment is set up properly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;BMAKE_OPT=-IC:\PROGRA~1\Bentley\MICROS~2\mki\
MS=C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\
MSMDE=C:\PROGRA~1\Bentley\MICROS~2\
MSMDE_OUTPUT=C:\Users\SHAYGE\AppData\Local\Temp\Bentley\MicroStationSDK\
DEFAULT_TARGET_PROCESSOR_ARCHITECTURE=x64
DLM_NO_SIGN=1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Looking at the path - is the issue with the first line, pointing at &amp;#39;..\Hostx86\x86&amp;#39; folder?&lt;/p&gt;
&lt;p&gt;I was able to use the BUILD you mentioned and am digging into the output. Could this be the issue?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x86&lt;/pre&gt; - and -&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;__DOTNET_ADD_32BIT=1
__DOTNET_PREFERRED_BITNESS=32
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It looks like both host and tgt arch should be x64? I don&amp;#39;t think the DOTNET values need to be modified, as this is C++, but you&amp;#39;d know that better than I. &lt;strong&gt;So I made the change manually&lt;/strong&gt; in the command shell from x86 to x64 and am not getting the x86/x64 error, but it&amp;#39;s still not finding the other obj files, throwing unresolved external symbol errors. Until I&amp;#39;m sure this isn&amp;#39;t dumb error messages, I&amp;#39;m going to hold off posting the verbose log file.&lt;/p&gt;
&lt;p&gt;Going to try the make file rebuild first, see if cleaning that up will clarify the issue.&lt;/p&gt;
&lt;p&gt;Everyone has helped a lot on this - I don&amp;#39;t feel like I&amp;#39;m trying to decipher an alien language any more. Not understanding and trying to slog through it alone is quite challenging.&amp;nbsp; Thanks for the responses so far.&lt;/p&gt;
&lt;p&gt;G&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729326?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 18:33:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b6a81df9-297d-49b1-ab90-0c3b39a79215</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/cd8c72aa_2d00_0f53_2d00_4a59_2d00_9546_2d00_7ba0404d4a30"&gt;Gary Shay&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;MicroStation CONNECT Update SDK 17.0 is available, the most current, recommended and preferred release to try to work with (whenever possible).&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Individual&lt;/em&gt; &lt;a href="/products/microstation/f/microstation-announcements-forum/tags/SDK"&gt;MicroStation SDK Announcements&lt;/a&gt; are listed on the &lt;a href="/products/programming/microstation_programming/w/wiki/45108/sdk-releases#MSCECurrentRelease" rel="noopener noreferrer" target="_blank"&gt;MicroStation CONNECT Releases&lt;/a&gt;&amp;nbsp;page and provide links and info wrt:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;Download Link, Announcement, Resolved Issues, Version, Date, Size, Visual Studio Version, MSVCRT and .NET version requirements.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Each individual Announcement provides a Requirements section and essentially equate to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install required &lt;strong&gt;Microsoft Visual Studio&lt;/strong&gt; version, configuring the necessary Workloads requirements and Components listed&lt;/li&gt;
&lt;li&gt;Install closely matched &lt;strong&gt;MicroStation product&lt;/strong&gt; version&lt;/li&gt;
&lt;li&gt;Install closely matched &lt;strong&gt;MicroStation SDK&lt;/strong&gt; version; ensuring (remaining conditions/requirements):&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Microsoft &lt;strong&gt;8DOT3NAMES&lt;/strong&gt; enabled for source code folders&lt;/li&gt;
&lt;li&gt;Microsoft &lt;strong&gt;Run As Administrator&lt;/strong&gt; enabled when directing binary output files to system folders, like C:\Program Files\Bentley\...&lt;/li&gt;
&lt;li&gt;Build project source code using the MicroStation Developer Shell (Run as Admin)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each time the MicroStation Developer Shell is started it provides a brief listing of &amp;quot;essential variables&amp;quot; like the section below. In case you have other build environments and need to know what critical shell variables need to be present (at minimum) it is available:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[SDK Environment]

BMAKE_OPT=-IC:\PROGRA~1\Bentley\MICROS~2\mki\
MS=C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\
MSMDE=C:\PROGRA~1\Bentley\MICROS~2\
MSMDE_OUTPUT=C:\Users\ROBERT~1.HOO\AppData\Local\Temp\Bentley\MICROS~1\
DEFAULT_TARGET_PROCESSOR_ARCHITECTURE=x64
DLM_NO_SIGN=1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Similar to Jon&amp;#39;s advice to provide a copy of your environment variables for troubleshooting, the MicroStation CONNECT SDK provides a &amp;quot;build.bat&amp;quot; (with optional &amp;quot;verbose&amp;quot; argument) that you can use if your ProjectFolderName is the same as the MakeFileName convention that we typically use.&lt;/p&gt;
&lt;p&gt;So, if you had trouble building the MyApp example you could then &amp;quot;send us your build output&amp;quot; by doing this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the developer shell running as admin&lt;/li&gt;
&lt;li&gt;From the default Examples folder, type: pushd DialogBoxes\Myapp&lt;/li&gt;
&lt;li&gt;Type: build verbose&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When finished it will ask you if you want to view the log file generated, press Y to then examine the log file generated. If you use &amp;quot;verbose&amp;quot; as an argument to build your OS/Shell environment variables are listed first in the log file, followed by the most verbose output possible when using bmake on your project files. That sequential build output should provide enough information to know what variable and value is set in what file and line number to help you quickly and confidently find and resolve problems.&lt;/p&gt;
&lt;p&gt;If by chance you are using one of the dozen+ Bentley vertical product SDKs that &amp;quot;consume&amp;quot; the MicroStation/PowerPlatform (MSPP) SDK and does not synchronize and provide a &amp;quot;build.bat verbose&amp;quot; option; you could accomplish the same build output using a command like below - substituting your own application make file name:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set &amp;gt; %temp%\build.txt &amp;amp; doskey /macros &amp;gt;&amp;gt; %temp%\build.txt &amp;amp; bmake +avilC YourAppName.mke &amp;gt;&amp;gt; %temp%\build.txt&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;HTH,&lt;br /&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729291?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 15:09:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1dd3d7b4-74c1-4083-92dd-990c6d8b019e</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729282"]That doesn&amp;#39;t mean the path or other environment variables are set correctly[/quote]
&lt;p&gt;Open a Windows command prompt, type &lt;code&gt;set &amp;gt; %TEMP%\env_vars.txt&lt;/code&gt; then examine &lt;code&gt;env_vars.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Look for relevant definitions: e.g. &lt;code&gt;MS&lt;/code&gt; or &lt;code&gt;MSMDE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you do that in the CONNECT SDK shell, you&amp;#39;ll see the definitions of all the variables that &lt;a href="/members/d147c1e1_2d00_1607_2d00_4727_2d00_b6c7_2d00_d38cadffaa27"&gt;Robert Hook&lt;/a&gt; and his team have created to make our lives easier.&lt;/p&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729282"]CE was installed and then patched to 10.15.00.74.&amp;nbsp; Visual Studio 2019 was originally installe[/quote]
&lt;p&gt;The versions of Viz Studio can be installed side-by-side, I believe.&amp;nbsp; MicroStation &lt;a title="Be Communities: 	Bentley Developer Network Forum" href="/communities/other_communities/bentley_developer_network/f/bentley-developer-network-forum/147981/connect-sdk-updates-17-16-15-14-13-12-11-10-9-8" rel="noopener noreferrer" target="_blank"&gt;CONNECT Update 17 uses Viz Studio 2019&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729282?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 14:44:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:54551ce6-395b-4e32-95ff-4ad5ac83e77e</guid><dc:creator>Gary Shay</dc:creator><description>&lt;p&gt;In this case, the good news is that there&amp;#39;s only one version of SDK/Microstation that&amp;#39;s ever been installed on this development machine.&amp;nbsp; CE was installed and then patched to 10.15.00.74.&amp;nbsp; Visual Studio 2019 was originally installed, but when I figured out that wouldn&amp;#39;t work for C++ development, I backed that off to a version that would work with the CE update level.&lt;/p&gt;
&lt;p&gt;That doesn&amp;#39;t mean the path or other environment variables are set correctly, although all of the example code compiles first time and correctly.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m creating the new MKE now, will update shortly.&lt;/p&gt;
&lt;p&gt;G&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729277?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 14:24:09 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8878afc3-a8c7-4c6b-a6cf-9223b87a667f</guid><dc:creator>Jan Šlegr</dc:creator><description>[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729226"] but I wasn&amp;#39;t sure what would be needed.[/quote]
&lt;p&gt;When development issue is discussed, source code and expected vs actual results are needed nearly always.&lt;/p&gt;
&lt;p&gt;In the discussed case, source code is mke file (plus custome mki when used) and verbose make process log is the result. It should be enough to analyze problem in detail, without having the complete project available.&lt;/p&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86/729226"]I want to try modifying a newer make file first to see if this is due to an old disordered MKE[/quote]
&lt;p&gt;It can be, but in such case the old mke is probably written incorrectly. It can happen, I saw several &amp;quot;over defined&amp;quot; make files, ignoring that SDK shell is set to do things in the right way by default. Both compiler and linker are called using a huge amount of parameters, so it is easy to set some from them incorrectly.&lt;/p&gt;
&lt;p&gt;Or can it be (I do not know the project structure in detail) that there are V8i and CE versions side by side, and something is &amp;quot;cross linked&amp;quot;, because of hardcoded path (or incorrectly set PATH variable)?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729226?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 09:35:20 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4e86bcd5-2e9f-4953-9260-6305daa53809</guid><dc:creator>Gary Shay</dc:creator><description>&lt;p&gt;Jan -&lt;/p&gt;
&lt;p&gt;Thanks for the response.&amp;nbsp; I expected you to ask for more information, and I will share everything, but I wasn&amp;#39;t sure what would be needed. Trying to be respectful and hopeful that it&amp;#39;s a dumb mistake.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve got meetings today until mid-morning USEast, I will post that as soon as I can today.&amp;nbsp; I want to try modifying a newer make file first to see if this is due to an old disordered MKE or if there&amp;#39;s something else I missed updating the old file.&amp;nbsp; Either way I&amp;#39;ll post both the old and new.&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] Fatal link error: module machine type 'x64' conflicts with target machine type 'x86'</title><link>https://communities.bentley.com/thread/729178?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 04:14:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:493567eb-a409-454c-93ea-e80a84707d8f</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Gary,&lt;/p&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86"]Any suggestions (or magic bullets)?[/quote]
&lt;p&gt;My suggestion is to don not writing about thought and to start sharing concrete data. Unfortunately, your question is like to complain in long speech your car is broken somehow, because some light is red, describing what you think about this issue, possibilities and context, but you do tell nothing about car manufacturer, the car type, model and its configuration.&lt;/p&gt;
&lt;p&gt;Please:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;share your .mke file (and .mki, if you use any custom one)&lt;/li&gt;
&lt;li&gt;create and share make process verbose log file (when don&amp;#39;t know how, search for &amp;quot;build verbose&amp;quot; phrase)&lt;/li&gt;
&lt;/ul&gt;
[quote userid="278325" url="~/products/programming/microstation_programming/f/microstation-programming---forum/234811/connect-c-fatal-link-error-module-machine-type-x64-conflicts-with-target-machine-type-x86"]but I just don&amp;#39;t know where to look for it.[/quote]
&lt;p&gt;The error message is very clear: The problem is produced by linker, so you should search in make file and/or in log file, for what modules this error is produced and how (using what arguments) they are compiled.&lt;/p&gt;
&lt;p&gt;MicroStation SDK shell is configured to do things right, so when there is the problem with x86 files, they are external or make file is configured to compile x86 objects and not standard x64 variant.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>