Search code examples
c++gcccorbaidlace

tao_idl returns with unspecified error when compiling using gcc


Hi I'm quite new to ACE ORB(TAO). My exisiting system compiles fine with xcc compiler in solaris. Now I got to use gcc compiler instead. When I try to compile my source code using gcc, I get the following error

/sbcimp/run/pd/ACE/6.0.7_x86/64Opt/bin/tao_idl: preprocessor "CC" returned with an error xmake: /sbcimp/run/pd/ACE/6.0.7_x86/64Opt/bin/tao_idl: error 1 (0x1)

Why does tao_idl return this error? All I know is tao_idl compiles idl sources for ACE ORB. This error doesn't provide me any other clue regarding the reason behind this error.. Where can I find further details about this error?

I dont see much help in the net for tao_idl compiling. Can someone shed some light on this


Solution

  • In addition to @Johnny Willemsen's answer, I thoguht of adding a bit of more details so that it would be helpful for someone. TAO_IDL uses an external pre processor.

    1. If the macro TAO_IDL_PREPROCESSOR is defined, then it will use that.
    2. Else if the macro ACE_CC_PREPROCESSOR is defined, then it will use that.
    3. Otherwise, it will use "cc"

    The problem that I had was that I was trying to use g++ as the precompiler, without setting any of the above macros. Hence TAO_IDL was always looking for cc.

    Solution: export TAO_IDL_PREPROCESSOR=/rtcigp/run/pd/gcc/32-bit/4.4.1/bin/g++

    then include g++ binary into PATH export PATH="$PATH:/rtcigp/run/pd/gcc/32-bit/4.4.1/bin"

    This makes g++ as the preprocessor.