Page 1 of 1

Error while compiling custom operator code

Posted: Tue May 20, 2014 3:16 pm
by prasson_ibm
Hi,

I am trying to compile custom operator code on AIX server but i am getting below error message:-

Code: Select all

$ /usr/vacpp/bin/xlC_r -O -q64 -c /opt/IBM/InformationServer/Server/PXEngine/include strrevop.c -o strrevop_temp.o
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_framework/osh_name.h", line 23.10: 1506-296 (S) #include file <apt_util/string.h> not found.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_framework/osh_name.h", line 27.10: 1506-296 (S) #include file <apt_util/ustring.h> not found.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_framework/osh_name.h", line 31.10: 1506-296 (S) #include file <apt_util/converter_registry.h> not found.
I have already defined the exact path for these headers but i dont know why still i am getting above error :cry:

Code: Select all

#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_util/parse_err.h>
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_util/errind.h>
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_util/message.h>
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_util/errlog.h>
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_framework/type/basic/string.h> 
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_framework/type/basic/ustring.h> 
#include </opt/IBM/InformationServer/Server/PXEngine/include/apt_util/converter_registry.h>


Posted: Tue May 20, 2014 4:29 pm
by ray.wurlod
Are there #include declarations in any of the explicit header files you've named?

Posted: Tue May 20, 2014 6:35 pm
by chulett
Trick question? :wink:

Sure look to be some, they are the issue with their relative paths it would seem.

Posted: Wed May 21, 2014 9:09 am
by prasson_ibm
Hi Ray,

Sorry,but i dont understand exactly what you are asking. :cry:

I dont know if i understood correctly,but i went and looked into header files which i named here for e.g.

Code: Select all

 $ more /opt/IBM/InformationServer/Server/PXEngine/include/apt_util/parse_err.h

#ifndef APT_PARSE_ERR_H
#define APT_PARSE_ERR_H

#ifndef APT_DLL_H
#include <apt_util/dll.h>
#endif

#ifndef APT_EXCEPTION_H
#include <apt_util/exception.h>
#endif

#ifndef APT_STRING_H
#include <apt_util/string.h>
#endif

#ifndef APT_USTRING_H
#include <apt_util/ustring.h>
#endif

And i can see the #include defined there.

Posted: Wed May 21, 2014 9:44 am
by qt_ky
Try using absolute paths (give full path for each .h file) rather than relative paths. Relative paths are only relative to the current working directory, which can change.

Posted: Wed May 21, 2014 7:45 pm
by prasson_ibm
I believe i am giving full path of .h headers.

Posted: Wed May 21, 2014 8:55 pm
by qt_ky
On the command line, you may be missing the -I option in front of the include path provided. Try inserting -I with no space.

Code: Select all

-I/opt/IBM/InformationServer/Server/PXEngine/include
This topic shows a compiler command where two include paths have been referenced.

Posted: Thu May 22, 2014 8:27 am
by prasson_ibm
Hi,

Thanks for your help.

Now i am getting below error:-

Code: Select all

dsadm@ait-etl01dev:/home/dsadm/pras $ /usr/vacpp/bin/xlC_r -O -q64 -c -I/opt/IBM/InformationServer/Server/PXEngine/include myhelloworld.c -o myhelloworld_temp.o
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 82.9: 1506-166 (S) Definition of function u_quad_t requires parentheses.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 84.10: 1506-296 (S) #include file <strstream> not found.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 140.15: 1506-294 (S) Syntax error in expression on #if directive.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 82.25: 1506-276 (S) Syntax error: possible missing '{'?
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 145.19: 1506-260 (S) Octal integer constant 0i64 is not valid.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/ints.h", line 145.11: 1506-045 (S) Undeclared identifier value.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 30.1: 1506-166 (S) Definition of function class requires parentheses.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 30.7: 1506-276 (S) Syntax error: possible missing '{'?
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 37.1: 1506-166 (S) Definition of function class requires parentheses.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 37.7: 1506-276 (S) Syntax error: possible missing '{'?
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 46.5: 1506-045 (S) Undeclared identifier friend.
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 49.5: 1506-058 (S) Label public has already been defined on line 47 of "/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h".
"/opt/IBM/InformationServer/Server/PXEngine/include/apt_util/fast_alloc_holder.h", line 50.37: 1506-277 (S) Syntax error: possible missing ';' or ','?
/usr/vacpp/bin/xlC_r: 1501-230 (S) Internal compiler error; please contact your Service Representative. For more information visit:

I am not using <strstream> header in the code,but still i am getting an error :cry:

Posted: Thu May 22, 2014 6:07 pm
by ray.wurlod
Does one of the header files which you ARE including (probably ints.h) contain a declaration to include the srstream header ?