Altera_Forum
Honored Contributor
11 years agoProblem compiling hello world on Windows
I am attempting to compile and run the hello world design example using the emulator on Windows 7 with Visual Studio 2013. I have AOCL and Quartus installed and the environment configured according to the quick start guide.
The host application compiles successfully using Visual Studio but when I run the executable, a message appears that says "The program can't start because altera_s5_ref_mmd.dll is missing from your computer. Try reinstalling the program to fix this problem." There is a file named altera_s5_ref_mmd.lib located in %ALTERAOCLSDKROOT%\board\s5_ref\windows64\lib but I do not see a dll. I also see the same error when I run aocl diagnose. Additionally, I am not able to compile the kernel. When I run "aoc -march=emulator -v device/hello_world.cl", this is the output:
aoc: Environment checks are completed successfully.
You are now compiling the full flow!!
aoc: Selected target board s5_ref
aoc: Running OpenCL parser....
aoc: OpenCL parser completed successfully.
aoc: Compiling for Emulation ....
Error: Optimizer FAILED.
Refer hello_world/hello_world.log for details.
Here is the contents of hello_world.log:
Microsoft (R) Incremental Linker Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Creating library libkernel.lib and object libkernel.exp
libkernel.obj : error LNK2019: unresolved external symbol printf referenced in function hello_world
libkernel.obj : error LNK2019: unresolved external symbol ldexp referenced in function _ZL6lengthDv4_d
libkernel.obj : error LNK2019: unresolved external symbol sinf referenced in function _Z8__tg_sinf
libkernel.obj : error LNK2019: unresolved external symbol cosf referenced in function _Z8__tg_cosf
libkernel.obj : error LNK2019: unresolved external symbol tanf referenced in function _Z8__tg_tanf
libkernel.obj : error LNK2019: unresolved external symbol sin referenced in function _Z8__tg_tand
libkernel.obj : error LNK2019: unresolved external symbol cos referenced in function _Z8__tg_tand
libkernel.obj : error LNK2019: unresolved external symbol asinf referenced in function _Z9__tg_asinf
libkernel.obj : error LNK2019: unresolved external symbol acosf referenced in function _Z9__tg_acosf
libkernel.obj : error LNK2019: unresolved external symbol atanf referenced in function _Z9__tg_atanf
libkernel.obj : error LNK2019: unresolved external symbol exp referenced in function _Z10__tg_sinhff
libkernel.obj : error LNK2019: unresolved external symbol expf referenced in function _Z10__tg_coshff
libkernel.obj : error LNK2019: unresolved external symbol logf referenced in function _Z8__tg_logf
libkernel.obj : error LNK2019: unresolved external symbol log referenced in function _Z10__tg_log10d
libkernel.obj : error LNK2019: unresolved external symbol floorf referenced in function _Z10__tg_truncf
libkernel.obj : error LNK2019: unresolved external symbol ceilf referenced in function _Z10__tg_truncf
LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
libkernel.dll : fatal error LNK1120: 17 unresolved externals
I have set %LIB% to "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib". The output of "aocl link-config" is /libpath:C:\altera\14.0\hld\board\s5_ref/windows64/lib /libpath:c:/altera/14.0/hld/host/windows64/lib alterahalmmd.lib altera_s_ref_mmd.lib alteracl.lib acl_emulator_kernel_rt.lib pkg_editor.lib libelf.lib acl_hostxml.lib Any assistance is appreciated.