Can not generate lib file for shared dll for TAO IDL

253 Views Asked by At

One IDL file exception.idl

module project{
    exception JobCreateException{
    string errorMessage;
   };

}

parts of MPC file is:

project(idl_exception): taoidldefaults, anytypecode {
   idlflags += -GI -Wb,stub_export_macro=EXCEPTION_STUB_Export -Wb,stub_export_include=exception_stub_export.h -Wb,skel_export_macro=EXCEPTION_SKEL_Export 

-Wb,skel_export_include=exception_skel_export.h

  IDL_Files {
    exception.idl
  }
 custom_only = 1
}

  project(idl_exception_skel): naming, iortable, utils, avoids_corba_e_micro, anytypecode {
     sharedname = idl_exception_skel
      after +=  idl_exception
      Source_Files {
         exceptionS.cpp
      }
     Header_Files{
    exceptionS.h
        exceptionC.h
        exception_skel_export.h 
    }
   dynamicflags += EXCEPTION_SKEL_BUILD_DLL EXCEPTION_STUB_BUILD_DLL
 }

According to mpc file, I want to generate a skeleton DLL files by VC8, and the .lib file would be linked by server implementation.

However, after compilation, the idl_exception_skel.dll file is successfully generated, but no .lib file.

Than i add a new struct like:

struct myobject{
   string name;
};

inside of idl file and regenerate all, the lib file shows up.

Is there any explanation for what kinds of IDL file can not be for skeleton? @Johnny Willemsen

1

There are 1 best solutions below

0
On

The skel library has to link with the stub library that is related to the IDL file. For the stub project add EXCEPTION_STUB_BUILD_DLL to the dynamicflags, for the skel project only use EXCEPTION_SKEL_BUILD_DLL. The fact that the lib is missing hints at unresolved symbols, which are caused by the fact that you don't add the idl_exception_stub to the libraries of idl_exception_skel.