A
Arun
Hello,
I am trying to build a 64bit shared library out of C routines and i
got in to some issues while including the header file stddef.h. I am
using nmake comands (for VS 2008 Ver 9.0) to compile the sources. It
would be much helpful if some body can throw some light on the
following errors i am encountering.
C:\Apps\SC03-Ver14\jm72_orig\src\jm72>nmake /f Makefile.nmake all
arch=win64
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling file hal_adf_c.c
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
\amd64\cl" /c
/DUPPERCASE /DnoFLEXM /D__HDF /DEZXML_NOMMAP /
DNOUNDERSCORE /O
2 /c /I..\..\include /I /I /I..\..\include\jm72 /I"C:\Apps\SC03-
Ver14\prop\CGNS
\include\ADF" /I"C:\Apps\SC03-Ver14\prop\HDF5\1.8.7_x64\include
\hdf5_ser" hal_
adf_c.c /Fohal_adf_c.owin64
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
hal_adf_c.c
...\..\include\jm72\stddef.h(5) : error C2054: expected '(' to follow
'__SIZE_TYP
E__'
...\..\include\jm72\stddef.h(6) : error C2085: '__WCHAR_TYPE__' : not
in formal p
arameter list
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 9.0\
VC\bin\amd64\cl.EXE"' : return code '0x2'
Stop.
The file stddef.h reads as follows.
#ifndef _STDDEF_H
#define _STDDEF_H
#define NULL ((void *)0)
typedef __SIZE_TYPE__ size_t;
typedef __WCHAR_TYPE__ wchar_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define offsetof(type, field) ((size_t) &((type *)0)->field)
/* need to do that because of glibc 2.1 bug (should have a way to test
presence of 'long long' without __GNUC__, or TCC should define
__GNUC__ ? */
#if !defined(__int8_t_defined) && !defined(__dietlibc__)
#define __int8_t_defined
typedef char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef long long int int64_t;
#endif
void *alloca(size_t);
#endif
Here comes the details regarding the C compiler.
C:\Apps\SC03-Ver14\jm72_orig\src\jm72>cl -version
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-version'
cl : Command line error D8003 : missing source filename
Any inputs on this would be highly appreciated.
Thanks in advance,
Arun
I am trying to build a 64bit shared library out of C routines and i
got in to some issues while including the header file stddef.h. I am
using nmake comands (for VS 2008 Ver 9.0) to compile the sources. It
would be much helpful if some body can throw some light on the
following errors i am encountering.
C:\Apps\SC03-Ver14\jm72_orig\src\jm72>nmake /f Makefile.nmake all
arch=win64
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling file hal_adf_c.c
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
\amd64\cl" /c
/DUPPERCASE /DnoFLEXM /D__HDF /DEZXML_NOMMAP /
DNOUNDERSCORE /O
2 /c /I..\..\include /I /I /I..\..\include\jm72 /I"C:\Apps\SC03-
Ver14\prop\CGNS
\include\ADF" /I"C:\Apps\SC03-Ver14\prop\HDF5\1.8.7_x64\include
\hdf5_ser" hal_
adf_c.c /Fohal_adf_c.owin64
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
hal_adf_c.c
...\..\include\jm72\stddef.h(5) : error C2054: expected '(' to follow
'__SIZE_TYP
E__'
...\..\include\jm72\stddef.h(6) : error C2085: '__WCHAR_TYPE__' : not
in formal p
arameter list
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 9.0\
VC\bin\amd64\cl.EXE"' : return code '0x2'
Stop.
The file stddef.h reads as follows.
#ifndef _STDDEF_H
#define _STDDEF_H
#define NULL ((void *)0)
typedef __SIZE_TYPE__ size_t;
typedef __WCHAR_TYPE__ wchar_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define offsetof(type, field) ((size_t) &((type *)0)->field)
/* need to do that because of glibc 2.1 bug (should have a way to test
presence of 'long long' without __GNUC__, or TCC should define
__GNUC__ ? */
#if !defined(__int8_t_defined) && !defined(__dietlibc__)
#define __int8_t_defined
typedef char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef long long int int64_t;
#endif
void *alloca(size_t);
#endif
Here comes the details regarding the C compiler.
C:\Apps\SC03-Ver14\jm72_orig\src\jm72>cl -version
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-version'
cl : Command line error D8003 : missing source filename
Any inputs on this would be highly appreciated.
Thanks in advance,
Arun