[omniORB] Building a DLL

baileyk at schneider.com baileyk at schneider.com
Wed Oct 22 09:40:30 BST 2003


I can't find _OMNIORB_STUB_DLL anywhere in the stub code or anywhere else
in the omniORB headers, so I don't think it's necessary to define that.  I
didn't when I created a DLL from the _SK.cc file.

Can you elaborate on the use of _OMNIORB_NTDLL_IMPORT?  This would be
needed in hand-written code that I want to include in the stub DLL right?
If the stub DLL has only the stub code there's nothing that needs
_OMNIORB_NTDLL_IMPORT added to it right?  The brevity of the comment you
quoted is what I meant by "not well documented".  I believe I figured out
what it meant, and if I did then I hope my last reply serves as a better
reference.  If no one comes up with easier to follow directions I'll try to
put my step-by-step in the wiki.

Kendall






                                                                                                                                         
                      "Ulf Stoermer"                                                                                                     
                      <ulf at emi.yamaha.co.jp>               To:       "OmniORB" <omniORB-list at omniorb-support.com>                        
                      Sent by:                             cc:                                                                           
                      omniorb-list-bounces at omniorb-        Fax to:                                                                       
                      support.com                          Subject:  RE: [omniORB] Building a DLL                                        
                                                                                                                                         
                                                                                                                                         
                      10/21/2003 08:00 PM                                                                                                
                                                                                                                                         
                                                                                                                                         




Hi,

in the header file omniORB4/CORBA_sysdep.h I found following
comment (I guess written by Sai Lai) and it worked for me:

// To package stubs into dlls:
//   1. Define the cpp macro _OMNIORB_STUB_DLL when the stub _SK.cc is
//      compiled.
//   2. A .def file has to be created to export the symbols in the dll.
//      The .def file can be generated automatically based on the output
//      of dumpbin. For an example, look at how the omniORB2 dll is
created.
//
// To use stubs that has been packaged into dlls:
//   1. Make sure that the cpp macro USE_stub_in_nt_dll is defined before
//      the stub header (.hh) is included.
//
// Use _OMNIORB_NTDLL_IMPORT to ensure that MSVC++ use the correct linkage
// for constants and variables exported by a DLL.

Cheers

Ulf










More information about the omniORB-list mailing list