I have been working on a project for the last few months which involves me writing some scientific simulations in C++ using Visual Studio 2012 on Windows 8. I use GNU Science Library for some linear algebra and random number functions.
The program runs quite slowly on my laptop so I've been given an account that I can remote desktop too which will be able to run more quickly. I don't have admin rights to install GSL etc there and the remote desktop is on XP, so I need my .exe to work there.
So I've done what's suggested here: xxxxxx.exe is not a valid Win32 application and here: Visual Studio 2012 compile for XP - not valid win32 - v110_xp
But when I try to compile my code with the settings: Platform Toolset: Visual Studio 2012 - Windows XP (v110_xp) Code Generation - Runtime Library: /MT Linker - System - SubSystem: Console
I get errors saying:
Error 10 error LNK2005: _printf already defined in LIBCMT.lib(printf.obj) C:.....\ProjectName\MSVCRTD.lib(MSVCR110D.dll) ProjectName
Error 8 error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj) C:.....\ProjectName\MSVCRTD.lib(MSVCR110D.dll) ProjectName
Error 7 error LNK2005: _free already defined in LIBCMT.lib(free.obj) C:.....\ProjectName\MSVCRTD.lib(MSVCR110D.dll) ProjectName
Error 13 error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj) C:.....\ProjectName\MSVCRTD.lib(MSVCR110D.dll) ProjectName
Error 9 error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj) C:.....\ProjectName\MSVCRTD.lib(MSVCR110D.dll) ProjectName
and quite a few more.
I think this might be to do with what is mentioned here: How to avoid "error LNK2005:" (already defined stdlib functions) when compiling libpng with Microsoft Visual Studio '08?
So even though my project is using the right settings my GSL isn't maybe? But I'm not too sure how this all works.
Thanks for any help you can offer