Dragonfly Q&A

Error linking Dragonfly library in Visual Studio

0 like 0 dislike
In setting up my Visual Studio for the Tutorial, I've run into an error that I'm not entirely sure how I should go about fixing.

I've downloaded SFML 2.4.0 and the latest Dragonfly, set up VS2013 as my compiler, changed the dropdown to x86 and updated the properties. Everything seems to be set up properly, but I don't really know where this error is coming from.

It appears to be in one of the files in the actual game engine, but I don't want to go messing around with Engine code if I don't have to.

I'm getting 2 Errors:

"mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in game.obj"


"module machine type 'x64' conflicts with target machine type 'X86'    saucer-shoot."

They only showed up after all of the settings were in place, and if I try to fix the latter one by switching the module to x86, it tells me that it needs to be x64.

Any help would be appreciated! :D
Dragonfly version 4.2
asked Aug 26, 2016 in Tutorial by ErikCerini

1 Answer

0 like 0 dislike
You setup VS 2013?  You'll want to use VS 2015.  That might be the problem right there.  My Dragonfly is compiled with VS 2015 and, while I don't know all the compatibility issues with VS, I know SFML is very particular about matching versions so it might well be the same for Dagonfly.

<p>You will definitely need to build for the x86 target.

<p>Download and install the <b>32-bit version</b> of SFML for VS 2015, too.

<p>(You can't fiddle around with the engine code since you don't have it. ;-))
answered Aug 26, 2016 by claypool
edited Aug 26, 2016 by claypool
I'll try setting the compiler back when I get out of class. You're probably right. I was just confused because somewhere in the setup tutorial i thought it said to download VS2013 and set your compiler to that even if you were using VS2015 as your IDE. But I may have misread
Alright so that got rid of the 1900-1800 error, but I'm still getting the x86/x64 error. If I set the module to x86, it tells me to set the module to x64 and if I set it to x86 it tells me to make it x64.
Do you have the 32-bit version of SFML?  What is the exact error you get when you set the build to x86?
I have the 64 bit SFML because I'm running a 64 bit OS

The exact error is (directly copied from VS): "
Error    LNK1112    module machine type 'X86' conflicts with target machine type 'x64'    saucer-shoot    A:\workspace\game0\vs-2015\libdragonfly-win32-debug.lib(utility.obj)"
and when I change the module to x86, I get the same error, but with X86 and X64 switched.
64-bit systems can handle 32-bit libraries, too.  Dragonfly is compiled as win32.  Try the 32-bit SFML.
Now it says I'm missing a bunch of .dll files:




It sounds like you haven't named the SFML directories the same as in the included game0 project files.  So, see step #6 in the setup guide:


You might look at the other steps in this guide if you are effectively building a project file yourself.</p>
There we go. I fixed it.

I had fixed the folder name everywhere else, but I had forgotten to change it in the Debug Environment. Oops xD
More information about Dragonfly can be found on the Dragonfly Home Page.