Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Altera OpenCL SDK with Visual Studio 2015

Hi,

Is there anyone tried to setup the development environment with VS2015 and successfully build the Host program?

The VS2010 is used in the Altera get started guide for the env setup. I have tried the setup wit VS2013. The only downside of VS2013 is PDB info is not available in Debug build, as the PDB files are for VS2010. But I just could not make it work in VS2015.

Thanks for help.

8 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you probably run into some incompatibly issue? to ensure what you trying to suspect is correct, maybe do a quick one by down grading to VS2010 and redo then.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yep, the same setup works for VS2013, but failed on VS2015.

    It seems the C/C++ runtime used by Altera (v15.0) is not compatible with VS2015. Just wondering, if anyone try out the v15.1 Altera SDK with VS2015, and make a successful compile.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    when you reinstall to VS2015, just to confirm is all the environment path is pointing to VS2015 one?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yep, the cmd I am using is from the VS2015, i think it is not path issue, should be sth like the VS2015 is using a different version of the ms runtime/compile time libs

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    still good to have your reply, please let me know if you make it work later. :)

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I got stuck as well with Visual Studio 2015.

    I do not know what to set for property Platform Toolset”. Training material suggest Window71.1SDK but I can not install it on my system. None of the available options work.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have had success compiling the vector_add test code with Visual Studio v14.0 (aka 2015)

    1) change Project vector_add properties Additional Depenancies "OpenCL.lib;legacy_stdio_definitions.lib;%(Additio nalDependencies)"

    2) change the main.cpp program, at top of file after includes

    FILE _iob[] = { *stdin, *stdout, *stderr };

    extern "C" FILE * __cdecl __iob_func(void) { return _iob; }

    extern "C" void __imp__set_output_format(void) {};

    This may break other things, but the vector_add test works with these changes. (refs https://stackoverflow.com/questions/31242820 , https://stackoverflow.com/questions/30412951 )