[Csnd] Possible machine type incompatibility?

I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
Is the fatal error referring to the library?

C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
1>Done building project "csound_api_test.vcxproj" -- FAILED.

#include "csound.hpp"

int main(int argc, const char** argv)
{
  Csound* cs = new Csound();
int result = cs->Compile(argc, argv);
  if (result == 0)
  {
    result = cs->Perform();
  }
  return (result >= 0 ? 0 : result);

}

If the program is using machine-instructions appropriate to a fully-64-bit computer, on a machine that only uses 32-bit instructions for some of those operations, yes, that would almost certainly crash the program.

I think you just need to select to build an x64 project configuration in Visual Studio. It can do both, but Csound is a 64 bit library, so it won't work with 32 bit programs.

Just get rid of the 32 bit configurations, you won't need those.

Prof. Victor Lazzarini
Maynooth University
Ireland

Yes. x86 is 32 bit CPU architecture, x64 is 64 bit CPU architecture. Is it possible that you have a 32 bit CPU only architecture version of Windows? 64 bits is now standard for Csound and most software. If you have a 64 bit version of Windows than change your project options to target x64.

I think it is more likely that she is using an x86 configuration in VS. I noticed that last year when I was helping some students who had Windows machines. When you start a new project, VS creates configurations for both architectures and tries to build for both, failing miserably if you added a 64bit library to the project. It’s very confusing if you are only starting up with using VS and programming.

Prof. Victor Lazzarini
Maynooth University
Ireland