- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
When I compile the following source code, it appears that Intel C++ Compiler is mangling "ippsDESBufferSize" regardless of the "/TC" option. __cplusplus is also not defined.
#include "stdio.h"
#include "ippCP.h"
int WinMainCRTStartup() {
int result, size;
result = (int) ippsDESBufferSize(&size);
printf("Result: %d, size: %d ", result, size);
#ifdef __cplusplus
printf("def __cplusplus ");
#endif
return 0;
}
When I try to link the object (compiled with ICC) of this source file with ippCP_XSC41PPC_r.lib in order to generate the executable, I receive this error from the linker:
Compiling...
main.c
Linking...
main.obj : error LNK2001: unresolved external symbol _ippsDESBufferSize@4
ARMV4Rel/tstajd.exe : fatal error LNK1120: 1 unresolved externals
If I use Microsoft eMbedded Visual C++ to compile the source file, the executable is generated without any errors. The same applies to gcc in Linux.
Any ideas of how I can solve this problem?
Environment:
* Microsoft Windows 2000 Professional
* Microsoft eMbedded Visual C++ 4
* PocketPC 2003
* Intel XScale C++ Compiler 1.1
--------------------------------
Follow up (May 26th):
From ippdefs.h:
#if defined( _WIN32 ) || defined ( _WIN64 )
#define __STDCALL __stdcall
#define __CDECL __cdecl
#define __INT64 __int64
#define __UINT64 unsigned __int64
#else
#define __STDCALL
#define __CDECL
#define __INT64 long long
#define __UINT64 unsigned long long
#endif
#if !defined( IPPAPI )
#if defined( IPP_W32DLL ) && (defined( _WIN32 ) || defined( _WIN64 ))
#if defined( _MSC_VER ) || defined( __ICL )
#define IPPAPI( type,name,arg )
extern __declspec(dllimport) type __STDCALL name arg;
#else
#define IPPAPI( type,name,arg ) extern type __STDCALL name arg;
#endif
#else
#define IPPAPI( type,name,arg ) extern type __STDCALL name arg;
#endif
#endif
Intel C++ Compiler seems to define _WIN32 when compiling code for WinCE on ARM/XScale and therefore all functions are declared as __stdcall. From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_adjusting_naming_conventions.asp ,
__cdecl _name Mixed case preserved
__stdcall _name@nn Mixed case preserved
I've dumped the symbols in Intel IPP ippCP_XSC41PPC_r.lib for ARM/XScale and none of them have the __stdcall naming convention, so I suppose they were compiled with __cdecl. Would this be a issue in ippdefs.h (__cdecl should be default for WinCE) or in Intel C++ Compiler (_WIN32 shouldn't be defined for WinCE -- only _W32_WCE should be defined)?
When I compile the following source code, it appears that Intel C++ Compiler is mangling "ippsDESBufferSize" regardless of the "/TC" option. __cplusplus is also not defined.
#include "stdio.h"
#include "ippCP.h"
int WinMainCRTStartup() {
int result, size;
result = (int) ippsDESBufferSize(&size);
printf("Result: %d, size: %d ", result, size);
#ifdef __cplusplus
printf("def __cplusplus ");
#endif
return 0;
}
When I try to link the object (compiled with ICC) of this source file with ippCP_XSC41PPC_r.lib in order to generate the executable, I receive this error from the linker:
Compiling...
main.c
Linking...
main.obj : error LNK2001: unresolved external symbol _ippsDESBufferSize@4
ARMV4Rel/tstajd.exe : fatal error LNK1120: 1 unresolved externals
If I use Microsoft eMbedded Visual C++ to compile the source file, the executable is generated without any errors. The same applies to gcc in Linux.
Any ideas of how I can solve this problem?
Environment:
* Microsoft Windows 2000 Professional
* Microsoft eMbedded Visual C++ 4
* PocketPC 2003
* Intel XScale C++ Compiler 1.1
--------------------------------
Follow up (May 26th):
From ippdefs.h:
#if defined( _WIN32 ) || defined ( _WIN64 )
#define __STDCALL __stdcall
#define __CDECL __cdecl
#define __INT64 __int64
#define __UINT64 unsigned __int64
#else
#define __STDCALL
#define __CDECL
#define __INT64 long long
#define __UINT64 unsigned long long
#endif
#if !defined( IPPAPI )
#if defined( IPP_W32DLL ) && (defined( _WIN32 ) || defined( _WIN64 ))
#if defined( _MSC_VER ) || defined( __ICL )
#define IPPAPI( type,name,arg )
extern __declspec(dllimport) type __STDCALL name arg;
#else
#define IPPAPI( type,name,arg ) extern type __STDCALL name arg;
#endif
#else
#define IPPAPI( type,name,arg ) extern type __STDCALL name arg;
#endif
#endif
Intel C++ Compiler seems to define _WIN32 when compiling code for WinCE on ARM/XScale and therefore all functions are declared as __stdcall. From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_adjusting_naming_conventions.asp ,
__cdecl _name Mixed case preserved
__stdcall _name@nn Mixed case preserved
I've dumped the symbols in Intel IPP ippCP_XSC41PPC_r.lib for ARM/XScale and none of them have the __stdcall naming convention, so I suppose they were compiled with __cdecl. Would this be a issue in ippdefs.h (__cdecl should be default for WinCE) or in Intel C++ Compiler (_WIN32 shouldn't be defined for WinCE -- only _W32_WCE should be defined)?
Message Edited by augustojd on 05-26-2005 06:32 AM
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
IPP functions should be declared as STDCALL. If it is not so please submit yuor issue report to IPP Technical Support (premier.intel.com)
Regards,
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page