0

I am trying to compile a C++ application on SUN server using the compiler Sun C++ 5.9 SunOS_sparc Patch 124863-01.However i am getting an compilation errror saying that the compiler could not include header file.However the header file exist on the same folder and on the specified path/

CC  -Dbcc9 -Dsun10 -I/export/home/bcc/bb1/bccprod/bb/compilation/bh/bh_xx_1_70_1  -DENV_OPT -DENV_OPT  -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__SUN -Dsun -Dsparc -DSunOS53 -DCONFIG_64BIT -DNEW_ANSI -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -DSHARED_EXT=\"so\"  -DF257054 -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/dxlib/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/udrlib/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat++/include -Dbcc_CONFIG -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat/include -DF227344_CR102 -DF267107 -DF267107_d -DF268560 -DG_SUN -DG_EH -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -DDEBUG -DORACLE_DB_BRAND -I/u01/app/oracle/product/10.2.0/db_1/precomp/public -I/u01/app/oracle/product/10.2.0/db_1/rdbms/public -I/u01/app/oracle/product/10.2.0/db_1/rdbms/demo -I/u01/app/oracle/product/10.2.0/db_1/plsql/public -I/u01/app/oracle/product/10.2.0/db_1/network/public -DF_TAP_311 -DF_LCS_310 -DF_RAP_103  -g -DCONTRACT_DETAILS -DCREDIT_DISPLAY -DSORT_BILLS -DSPLIT_BILL -DD_ROAMING -DSWAP_DATES -DFIXLASADDR -DFIXUSERID -DFIXBIGAMT -DNOPRINTZEROINV -DFIXIPBXDISP -DARABTRANS -DFIX_MKRTTEXT -DOCCDESC -DFIXBARCODE -DNEWTAX8 -DCARRY_OVER -I./include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bh/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat++/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/xalan/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/xerces/include -I/usr/include  -DSOLARIS    -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__SUN -Dsun -Dsparc -DSunOS53 -DCONFIG_64BIT -DNEW_ANSI -D__EXTENSIONS__  -DF_TAP_311 -DF_LCS_310 -DF_RAP_103  -m64 -DNEW_ANSI -DG_ANSICPP -DG_LONGSIZE=64  -DGEN_INCIMP -w  -KPIC    -g -xs   -c bhComponentController.cpp -o bhComponentController.o
"**./include/bhComponentController.hpp", line 20: Error: Could not open include file "ComponentController.hpp"**
"./include/bhComponentController.hpp", line 183: Error: ComponentController is not defined.
"./include/bhTerminationHandler.hpp", line 107: Error: Could not open include file "TerminationHandler.hpp".
"./include/bhTerminationHandler.hpp", line 113: Error: TerminationHandler is not defined.
"bhComponentController.cpp", line 47: Error: The function "setTerminationHandler" must have a prototype.
"bhComponentController.cpp", line 70: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 73: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 76: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 79: Error: The function "strcat" must have a prototype.
9 Error(s) detected.
gmake: *** [bhComponentController.o] Error 9

The error is saying

"Error:l Could not open include file "ComponentController.hpp"

however the file ./include/bhComponentController.hpp is there and readable on the specified location.

Any idea please?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
jamel
  • 303
  • 2
  • 7
  • 16
  • 2
    maybe try adding `-I include` to the compile line. – Ivaylo Strandjev Jun 12 '13 at 16:22
  • Show us the `#include` statement, and make sure you have added the path to it in your compiler's directives. – John Dibling Jun 12 '13 at 16:22
  • 3
    If I'm reading those errors correctly it's finding bhComponentController.hpp perfectly fine, but that file then includes a file "ComponentController.hpp" which is what the compiler can't find. – Nigel Harper Jun 12 '13 at 16:41
  • Thanks guys actually the env variable MPDE_ROOT was pointing to the wrong directory.The pb is fixed but after fixing this issue we got the error below: Error: Could not open include file. – jamel Jun 12 '13 at 17:29
  • It is also possible that the compiler can find the file but can't open it. What permissions are attributed to the file? – nonsensickle Jun 12 '13 at 23:05

1 Answers1

0

add this one too -I/export/home/bcc/bb1/bccprod/bb/compilation/bh/bh_xx_1_70_1/include assumin g your sources are there. or I/pathtoyoursources/ #this is where bhComponentController.hpp is. SO that you can include"bhComponentController.hpp" directly.

adderly
  • 192
  • 1
  • 7