This content has been marked as final. Show 2 replies
Apparently sql2oci.h has macro definitions or other declarations that conflict with the standard headers <iostream> and <new>.
Try including <sql2oci.h> after the standard headers. In general, standard headers should be included before application and project headers to avoid such conflicts.
If still no joy, check with the supplier of header sql2oci.h to see whether it has known compatibility issues with g++ on Linux.
Thanks for the response.
Even if the include the header after the standard header, the error still persists.
In my case the file <sql2oci.h> is included via some other header-file.
- header1.h (includes <sql2oci.h>)
- shared-header.h (includes header1.h) has some function declarations.
- shared-header-func-defnitions.c (function defnitions)
- shared-header.h is included in many *.cc* files and that caused the problem.
Scrutinized the code and found that header1.h is not actually being used in any of the *.cc* files.
it is required only in the function-definitions (for declations included in shared-header.h).
Hence, moved header1.h from shared-header.h to shared-header-func-defnitions.c
That solved the issue.
I strictly believe that one should never include the defnition of a structure/function in a shared-header.