Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 2797

XE 2013 Update 3 breaks linkage of __declspec(dllexport)

$
0
0

I use Composer XE 2013 to compile OpenCV 2.4.4 which worked fine until Update 2. Now I recompiled with no changes using Update 3 which results in failure to link opencv_ts244.dll with this output:

opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.2@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.2@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)
opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.3@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.3@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)
opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.4@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.4@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)
opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.5@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.5@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)
opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.6@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.6@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)
opencv_ts244.exp : error LNK2001: unresolved external symbol "?vals.7@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA" (?vals.7@?1??all@MatDepth@__N_46_D__SDK_OpenCV_2_4_4_modules_ts_src_precomp_cpp_f8738051@perf@@SA?AUContainer@234@XZ@4PAHA)

The origin of this problem seems to be CV_ENUM which is defined as (in file ts_perf.hpp):

#define CV_EXPORTS __declspec(dllexport)
#define CV_ENUM(class_name, ...) 
namespace { class CV_EXPORTS class_name {
public:
  class_name(int val = 0) : _val(val) {}
  operator int() const {return _val;}
  ...
};
CV_ENUM(MatDepth, CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F, CV_USRTYPE1)

This happens for 32 and 64 bit builds in Windows. I am using VS2008 and the MS compiler succeeds to build it.

Here is all the code (contained in OpenCV-2.4.4.exe):
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.4/


Viewing all articles
Browse latest Browse all 2797


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>