Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Joseph_R_
Beginner
118 Views

Compiler options

Hi

I am getting the following error so my question is there an intel compiler option which would give better diagnostic i.e. say where size_t was originally defined

Thanks

 

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\crtdefs.h(494): error : invalid redeclaration of type name "size_t"

1> typedef unsigned __int64 size_t;

0 Kudos
4 Replies
Judith_W_Intel
Employee
118 Views

 

On Windows the compiler has a predefined value for size_t (__unsigned int on IA32 and __unsigned int64 on Intel 64).

What architecture are you using? What version of the compiler are you using (do an icl -V)?

 

 

Joseph_R_
Beginner
118 Views

icl info
 
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>cd C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\compilers_and_libraries_2017\windows\bin\intel64_ia32
C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\compilers_and_libraries_2017\windows\bin\intel64_ia32>icl -v
Intel(R) C++ Intel(R) 64 Compiler for applications running on IA-32, Version 17.0.2.187 Build 20170213
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.
icl: command line warning #10006: ignoring unknown option '/v'
icl: NOTE: The evaluation period for this product ends on 14-may-2017 UTC.
icl: command line error: no files specified; for help type "icl /help"
C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\compilers_and_libraries_2017\windows\bin\intel64_ia32>icl -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on IA-32, Version 17.0.2.187 Build 20170213
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.
icl: command line warning #10155: ignoring option '/V'; argument required
icl: command line error: no files specified; for help type "icl /help"
C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\compilers_and_libraries_2017\windows\bin\intel64_ia32>
 
cl info
 
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin>cl /v
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '/v'
cl : Command line error D8003 : missing source filename
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin>
SergeyKostrov
Valued Contributor II
118 Views

Take a look at https://software.intel.com/en-us/forums/intel-c-compiler/topic/731328 ( Post #9 ) for an example of how it needs to be done. As already mentioned size_t is a reserved type and can't be redefined.
SergeyKostrov
Valued Contributor II
118 Views

>>...intel compiler option which would give better diagnostic... /W5 - print all errors, warnings and remarks
Reply