Compiling Embree to 64bit release with VC++ 2010 Express

Compiling Embree to 64bit release with VC++ 2010 Express

Аватар пользователя amnonp5

Hi,

I've succesfully compiled to a 32bit release. Tried the cornell_box example, which runs fine. Now I'd like to compile to a 64bit release. I am on Windows 7 64bit SP1. I am using Microsoft Visual C++ 2010 Express. To solve initial build error I have added the path "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib" (forum may remove backslashes) to the VC++ Library Directories.

The initial build errors are solved with the above added path, but for full disclosure they were:
Common => 1>LINK : fatal error LNK1181: cannot open input file 'wsock32.lib'
Embree => 4>LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
========== Rebuild All: 2 succeeded, 2 failed, 0 skipped ==========

Now 3 out of 4 build succesfully, but embree.exe gives a list of LNK2001/LNK2019 build errors:

4>glutdisplay.obj : error LNK2019: unresolved external symbol __imp_glViewport referenced in function "void __cdecl embree::reshapeFunc(int,int)" (?reshapeFunc@embree@@YAXHH@Z)
4>glutdisplay.obj : error LNK2019: unresolved external symbol __imp_glDrawPixels referenced in function "void __cdecl embree::displayFunc(void)" (?displayFunc@embree@@YAXXZ)
4>glutdisplay.obj : error LNK2019: unresolved external symbol __imp_glPixelZoom referenced in function "void __cdecl embree::displayFunc(void)" (?displayFunc@embree@@YAXXZ)
4>glutdisplay.obj : error LNK2019: unresolved external symbol __imp_glRasterPos2i referenced in function "void __cdecl embree::displayFunc(void)" (?displayFunc@embree@@YAXXZ)
4>common.lib(platform.obj) : error LNK2019: unresolved external symbol __imp_VirtualAlloc referenced in function "void * __cdecl embree::os_malloc(unsigned __int64)" (?os_malloc@embree@@YAPEAX_K@Z)
4>common.lib(platform.obj) : error LNK2019: unresolved external symbol __imp_VirtualFree referenced in function "void __cdecl embree::os_free(void *,unsigned __int64)" (?os_free@embree@@YAXPEAX_K@Z)
4>common.lib(platform.obj) : error LNK2019: unresolved external symbol __imp_QueryPerformanceCounter referenced in function "double __cdecl embree::getSeconds(void)" (?getSeconds@embree@@YANXZ)
4>MSVCRT.lib(gs_support.obj) : error LNK2001: unresolved external symbol __imp_QueryPerformanceCounter
4>common.lib(platform.obj) : error LNK2019: unresolved external symbol __imp_QueryPerformanceFrequency referenced in function "double __cdecl embree::getSeconds(void)" (?getSeconds@embree@@YANXZ)
4>renderer.lib(render_device.obj) : error LNK2019: unresolved external symbol __imp_lstrcmpiA referenced in function "public: virtual struct embree::Device::__RTData * __cdecl embree::RenderDevice::rtNewData(char const *,unsigned __int64,void const *)" (?rtNewData@RenderDevice@embree@@UEAAPEAU__RTData@Device@2@PEBD_KPEBX@Z)
4>MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol __imp_EncodePointer referenced in function _onexit
4>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol __imp_EncodePointer
4>MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol __imp_DecodePointer referenced in function _onexit
4>MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol __imp_Sleep referenced in function __tmainCRTStartup
4>common.lib(thread.obj) : error LNK2001: unresolved external symbol __imp_Sleep
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_TerminateProcess referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcess referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_UnhandledExceptionFilter referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_SetUnhandledExceptionFilter referenced in function __report_gsfailure
4>MSVCRT.lib(unhandld.obj) : error LNK2001: unresolved external symbol __imp_SetUnhandledExceptionFilter
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_IsDebuggerPresent referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol RtlVirtualUnwind referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol RtlLookupFunctionEntry referenced in function __report_gsfailure
4>MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp_RtlCaptureContext referenced in function __report_gsfailure
4>MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetTickCount referenced in function __security_init_cookie
4>MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentThreadId referenced in function __security_init_cookie
4>MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcessId referenced in function __security_init_cookie
4>MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetSystemTimeAsFileTime referenced in function __security_init_cookie
4>common.lib(mutex.obj) : error LNK2019: unresolved external symbol __imp_InitializeCriticalSection referenced in function "public: __cdecl embree::MutexSys::MutexSys(void)" (??0MutexSys@embree@@QEAA@XZ)
4>common.lib(condition.obj) : error LNK2001: unresolved external symbol __imp_InitializeCriticalSection
4>common.lib(mutex.obj) : error LNK2019: unresolved external symbol __imp_DeleteCriticalSection referenced in function "public: __cdecl embree::MutexSys::~MutexSys(void)" (??1MutexSys@embree@@QEAA@XZ)
4>common.lib(condition.obj) : error LNK2001: unresolved external symbol __imp_DeleteCriticalSection
4>common.lib(mutex.obj) : error LNK2019: unresolved external symbol __imp_EnterCriticalSection referenced in function "public: void __cdecl embree::MutexSys::lock(void)" (?lock@MutexSys@embree@@QEAAXXZ)
4>common.lib(condition.obj) : error LNK2001: unresolved external symbol __imp_EnterCriticalSection
4>common.lib(mutex.obj) : error LNK2019: unresolved external symbol __imp_LeaveCriticalSection referenced in function "public: void __cdecl embree::MutexSys::unlock(void)" (?unlock@MutexSys@embree@@QEAAXXZ)
4>common.lib(condition.obj) : error LNK2001: unresolved external symbol __imp_LeaveCriticalSection
4>common.lib(condition.obj) : error LNK2019: unresolved external symbol __imp_CreateEventA referenced in function "public: __cdecl embree::ConditionSys::ConditionSys(void)" (??0ConditionSys@embree@@QEAA@XZ)
4>common.lib(condition.obj) : error LNK2019: unresolved external symbol __imp_CloseHandle referenced in function "public: __cdecl embree::ConditionSys::~ConditionSys(void)" (??1ConditionSys@embree@@QEAA@XZ)
4>common.lib(thread.obj) : error LNK2001: unresolved external symbol __imp_CloseHandle
4>common.lib(condition.obj) : error LNK2019: unresolved external symbol __imp_ResetEvent referenced in function "public: void __cdecl embree::ConditionSys::wait(class embree::MutexSys &)" (?wait@ConditionSys@embree@@QEAAXAEAVMutexSys@2@@Z)
4>common.lib(condition.obj) : error LNK2019: unresolved external symbol __imp_WaitForMultipleObjects referenced in function "public: void __cdecl embree::ConditionSys::wait(class embree::MutexSys &)" (?wait@ConditionSys@embree@@QEAAXAEAVMutexSys@2@@Z)
4>common.lib(condition.obj) : error LNK2019: unresolved external symbol __imp_SetEvent referenced in function "public: void __cdecl embree::ConditionSys::broadcast(void)" (?broadcast@ConditionSys@embree@@QEAAXXZ)
4>common.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp_GetActiveProcessorCount referenced in function "unsigned __int64 __cdecl embree::getNumberOfLogicalThreads(void)" (?getNumberOfLogicalThreads@embree@@YA_KXZ)
4>common.lib(thread.obj) : error LNK2001: unresolved external symbol __imp_GetActiveProcessorCount
4>common.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp_GetActiveProcessorGroupCount referenced in function "unsigned __int64 __cdecl embree::getNumberOfLogicalThreads(void)" (?getNumberOfLogicalThreads@embree@@YA_KXZ)
4>common.lib(thread.obj) : error LNK2001: unresolved external symbol __imp_GetActiveProcessorGroupCount
4>common.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp_GetConsoleScreenBufferInfo referenced in function "int __cdecl embree::getTerminalWidth(void)" (?getTerminalWidth@embree@@YAHXZ)
4>common.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp_GetStdHandle referenced in function "int __cdecl embree::getTerminalWidth(void)" (?getTerminalWidth@embree@@YAHXZ)
4>common.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp_GetModuleFileNameA referenced in function "class std::basic_string,class std::allocator > __cdecl embree::getExecutableFileName(void)" (?getExecutableFileName@embree@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_SetThreadIdealProcessorEx referenced in function "void __cdecl embree::setAffinity(void *,__int64)" (?setAffinity@embree@@YAXPEAX_J@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_SetThreadGroupAffinity referenced in function "void __cdecl embree::setAffinity(void *,__int64)" (?setAffinity@embree@@YAXPEAX_J@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentThread referenced in function "void __cdecl embree::setAffinity(__int64)" (?setAffinity@embree@@YAX_J@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_CreateThread referenced in function "struct embree::opaque_thread_t * __cdecl embree::createThread(void (__cdecl*)(void *),void *,unsigned __int64,__int64)" (?createThread@embree@@YAPEAUopaque_thread_t@1@P6AXPEAX@Z0_K_J@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_WaitForSingleObject referenced in function "void __cdecl embree::join(struct embree::opaque_thread_t *)" (?join@embree@@YAXPEAUopaque_thread_t@1@@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_TerminateThread referenced in function "void __cdecl embree::destroyThread(struct embree::opaque_thread_t *)" (?destroyThread@embree@@YAXPEAUopaque_thread_t@1@@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_TlsAlloc referenced in function "struct embree::opaque_tls_t * __cdecl embree::createTls(void)" (?createTls@embree@@YAPEAUopaque_tls_t@1@XZ)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_TlsSetValue referenced in function "void __cdecl embree::setTls(struct embree::opaque_tls_t *,void * const)" (?setTls@embree@@YAXPEAUopaque_tls_t@1@QEAX@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_TlsGetValue referenced in function "void * __cdecl embree::getTls(struct embree::opaque_tls_t *)" (?getTls@embree@@YAPEAXPEAUopaque_tls_t@1@@Z)
4>common.lib(thread.obj) : error LNK2019: unresolved external symbol __imp_TlsFree referenced in function "void __cdecl embree::destroyTls(struct embree::opaque_tls_t *)" (?destroyTls@embree@@YAXPEAUopaque_tls_t@1@@Z)
4>C:\\Users\\mainframe\\Downloads\\embree-1.1beta\\\\x64\\Release\\embree.exe : fatal error LNK1120: 48 unresolved externals
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========

I tried adding 'wsock32.lib' and 'kernel32.lib' to embree's Linker > Input > Additional Dependencies, but that did't have any impact.

How can I solve these build errors and go 64bit?

Thank you.

Best regards,
Amnon

4 posts / 0 новое
Последнее сообщение
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.
Аватар пользователя amnonp5

I have followed the instructions here:

http://www.maxforums.org/threads/intel_embree_real_ray_tracer/0001.aspx

Installed sp1 and the compiler fixup. witched platform toolset from v100 to Windows7.1 SDK.

But I still get exactly the same result as already described above.

Аватар пользователя Sven Woop (Intel)
Best Reply

I just installed Visual Studio 2010 Express on my Windows 7 machine. I can compile Embree 1.1 without problems and without any changes to the Visual Studio settings. I assume your Visual Studio installation is corrupted as the linker initially could not even find the kernel32.lib. Try reinstalling Visual Studio and make a clean recompile of Embree. BTW, maybe adding x64 to the path you modified fixes the issue. On my machine the 64 bit version of kernel32.lib is inC:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64

Аватар пользователя amnonp5

Using the x64 path doesn't solve it. But I removed everything (vc++, sdk, compilers) and did a complete re-install (basically following the steps in that earlier link). And the end results... it works! ;-) So thanks for the suggestion. I do have to set the platform toolset to sdk 7.1 manually in the projects (the default is v100). The 64bit release embree gives me (very roughly estimated) 40% fps increase, which is a nice bonus. All in all problem solved.

Зарегистрируйтесь, чтобы оставить комментарий.