Using Casablanca with Intel C++ Compiler

Jun 18, 2014 at 8:14 PM
Hi, I am using cpprestsdk 2.0.1 with VS2013 and Intel C++ Compiler XE 14 on Windows 7.

I use MS compiler for fast compile/debug, Intel compiler for optimized execution.
This builds and runs fine using the target VC_Debug.
When I switch to Intel_Release, however, I get 15 linker errors of the form:

Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl web::uri::uri(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (_imp(__imp_??0uri@web@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) D:\src\Juke\Juke\structure_info.obj Juke What steps do I need to take to build and run using Intel compiler w C++ REST SDK?

thanks
David
Jun 20, 2014 at 5:43 PM
Hi David,

We haven't tried or done any testing yet with the Intel compiler (only Microsoft's, gcc, and Clang) so I can't give you an exact set of instructions to follow. What you mention here makes me think perhaps you are not compiling the C++ Rest SDK with the correct macros to export the public APIs. I recommend you take a look at the vcxproj files under Release\src\build. In particular make sure you are defining _ASYNCRT_EXPORT and _PPLX_EXPORT.

Steve