Forum Discussion

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

VS2010 build opencl host fail problem

I use VS2010 to build opencl host program.

But I can not build it successfully.

Before builing the code, I already run the batch file to st PATH.

But VS2010 still has error message, how to solve it.

The error message as below:

1>InitializeBuildStatus:

1> Touching "x64\Release\matrix_con.unsuccessfulbuild".

1>SetCompileConfig:

1> ERROR: Could not find the 'aocl' command when trying to execute 'aocl compile-config'.

1> Please ensure that '%ALTERAOCLSDKROOT%\bin' is on the path; refer to the Intel(R) FPGA SDK for OpenCL(TM) Getting Started Guide for more information on setting up your environment.

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:00.02

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

batch file:

set ALTERAOCLSDKROOT=C:\intelFPGA_pro\17.0\hld

set AOCL_BOARD_PACKAGE_ROOT=C:\intelFPGA_pro\17.0\hld\board\a10_ref

set PATH=%ALTERAOCLSDKROOT%\bin;%PATH%;%ALTERAOCLSDKROOT%\host\windows64\bin;%AOCL_BOARD_PACKAGE_ROOT%\windows64\bin;%ALTERAOCLSDKROOT%\windows64\bin

3 Replies

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

    I see multiple spaces in your environmental variables, is this because of bad copy/pasting?

    You can open a cmd shell and type "aocl" to see if it works. If it doesn't it means the environmental variables are incorrect.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I see multiple spaces in your environmental variables, is this because of bad copy/pasting?

    You can open a cmd shell and type "aocl" to see if it works. If it doesn't it means the environmental variables are incorrect.

    --- Quote End ---

    Dear HRZ,

    multiple spaces is due to copy/past, there is no multiple spaces in my batch file.

    set PATH=%ALTERAOCLSDKROOT%\bin;%PATH%;%ALTERAOCLSDKROOT%\host\windows64\bin;%AOCL_BOARD_PACKAGE_ROOT%\windows64\bin;%ALTERAOCLSDKROOT%\windows64\bin

    I type "aocl compile-config" in cmd shell.

    It works, but there is an error message(ERROR: Could not find the 'aocl' command when trying to execute 'aocl compile-config'.) in VS2010.

    I still can not build host program in VS2010.

    CMD SHELL:

    D:\Acer_temp\opencl_altera>aocl compile-config

    -IC:/intelFPGA_pro/17.0/hld/host/include

    D:\Acer_temp\opencl_altera>

    Thanks,

    Matt