Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ale__Pale
Beginner
8,682 Views

Error #1739: redeclaration cannot add dllexport/dllimport

I need help with this error.
Using source file including <math.h>, the include hierarchy is

bands.c
Note: including file: ../opus-1.3-rc2/win32/config.h
Note: including file:  .\version.h
Note: including file: D:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include\math.h
Note: including file:  D:\Microsoft\Visual Studio 2013\VC\include\math.h
Note: including file:   D:\Microsoft\Visual Studio 2013\VC\include\crtdefs.h
Note: including file:    D:\Microsoft\Visual Studio 2013\VC\include\sal.h
Note: including file:     D:\Microsoft\Visual Studio 2013\VC\include\ConcurrencySal.h
Note: including file:    D:\Microsoft\Visual Studio 2013\VC\include\vadefs.h
Note: including file:  D:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include\math_common_define.h

D:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include\math.h(695): error #1739: redeclaration cannot add dllexport/dllimport to "ldexpf" (declared at line 721 of "D:\Microsoft\Visual Studio 2013\VC\include\math.h")
   _LIBIMF_EXTERN_C float    _LIBIMF_PUBAPI ldexpf( float __x, int __exp );
                                            ^

Here when the parsing returns back to Intel's math.h, the redeclared ldexpf in MSC native header is in some collision
My question is how to bypass the error.
The full compiler params are

D:\develop\Intel\compilers_and_libraries_2019.0.117\windows\\bin\intel64\icl /nologo /GF /MD /LD /W0 /Qlocation,link,"D:\Microsoft\Visual Studio 2013\VC\bin\amd64\link.exe" /Qlocation,masm,"D:\Microsoft\Visual Studio 2013\VC\bin\amd64\ml64.exe" /Qoption,c,--arg_dep_lookup /Qwd69 /Qvc12 /Ox /fp:extended /Qfp-speculation:safe /MP /O3 /Qipo /QxHost /fp:extended /Qfp-speculation:safe /DNDEBUG=1 /D_WIN32_IE=0x090B /D_WINDOWS=1 /DWINVER=0x0603 /D_WIN32_WINDOWS=0x0603 /D_WIN64=1 /DWIN64=1 /DWIN32=1 /D_WIN32_WINNT=0x0603 /D__NT__=0x0603 /D_WINDLL=1 /D_USRDLL=1 /Dinline=__inline /DPREFIX=\"D:/develop/GNU\" /DEXEC_PREFIX=\"D:/develop/GNU\" /DBINDIR=\"D:/develop/GNU/bin\" /DSBINDIR=\"D:/develop/GNU/sbin\" /DLIBEXECDIR=\"D:/develop/GNU/libexec\" /DDATADIR=\"D:/develop/GNU/share\" /DINCLUDEDIR=\"D:/develop/GNU/include\" /DLIBDIR=\"D:/develop/GNU/lib\" /DSYSCONFDIR=\"D:/develop/GNU/etc\" /DSHAREDSTATEDIR=\"D:/develop/GNU/com\" /DLOCALSTATEDIR=\"D:/develop/GNU/var\" /DLOCALEDIR=\"D:/develop/GNU/share/locale\" /DINFODIR=\"D:/develop/GNU/info\" /DMANDIR=\"D:/develop/GNU/man\" /DDOCDIR=\"D:/develop/GNU/doc\" /DEMACSDIR=\"D:/develop/GNU/emacs\" /DOLDINCLUDEDIR=\"/usr/include\" /DPACKAGE=\"opus\" /DPACKAGE_NAME=\"opus\" /DPACKAGE_TARNAME=\"opus\" /DPACKAGE_VERSION=\"1.0\" /D"PACKAGE_STRING=\"opus 1.0\"" /DPACKAGE_BUGREPORT=\"bug-opus@gnu.org\" /DPACKAGE_URL=\"http://www.opus-codec.org/\" /DPKGDATADIR=\"D:/develop/GNU/share/opus\" /DPKGLIBDIR=\"D:/develop/GNU/lib/opus\" /DPKGINCLUDEDIR=\"D:/develop/GNU/include/opus\" /DVERSION=PACKAGE_VERSION /DHAVE_CONFIG_H /DENABLE_EXPERIMENTAL_AMBISONICS /DDLL_EXPORT /DENABLE_EXPERIMENTAL_AMBISONICS /U_DEBUG /UFIXED_POINT /I./win32 /I. /I./include /I./celt /I./silk /I./silk/float /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include\icc /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include\intel64 /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\compiler\include /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\mkl\include /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\mkl\include\fftw /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\mkl\include\intel64 /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\ipp\include /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\tbb\include /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\pstl\include /ID:\develop\Intel\compilers_and_libraries_2019.0.117\windows\daal\include /I"D:\Microsoft\Visual Studio 2013\VC\include" /ID:\Microsoft\SDKs\Windows\8.1\include\um /ID:\Microsoft\SDKs\Windows\8.1\include\shared /ID:\Microsoft\SDKs\Windows\8.1\include /c /Fo./celt/ ./celt/bands.c ./celt/celt.c ./celt/celt_decoder.c ./celt/celt_encoder.c ./celt/celt_lpc.c ./celt/cwrs.c ./celt/entcode.c ./celt/entdec.c ./celt/entenc.c ./celt/kiss_fft.c ./celt/laplace.c ./celt/mathops.c ./celt/mdct.c ./celt/modes.c ./celt/pitch.c ./celt/quant_bands.c ./celt/rate.c ./celt/vq.c

 

I  also remark that $(ICInstallDir)\include\icc needs to be included in incpath to prefere Intel's xmmintrin.h. The replacement is not automatic as Intel's header file is in icc\ subfolder not prefixed anywhere. Is this intentional?

0 Kudos
2 Replies
Viet_H_Intel
Moderator
8,682 Views

 

To bypass, try to add /Qwd1739 to your command line.

Thanks,

Viet 

8,682 Views

Hi, I Also having same issue which is mentioned above

Reply