[omniORB] Building a DLL

baileyk at schneider.com baileyk at schneider.com
Tue Oct 21 13:04:39 BST 2003


I tried this recently and succeeded.  I didn't find it to be well
documented.  The suggestion I found was to see how the omniORB build
process itself creates the ORB DLLs.  The steps I followed after looking at
the omniORB make files and reviewing the mail list archives is listed
below.  I was attempting to create rsidl.dll from rs.idl.  Intermediate to
that I created rsidls.lib, a static library...

1. Build a static library from the stubs.  No special preprocessor defines
are required.  This yeilded rsidls.lib

2. Using the cygwin environment's command line tools I ran the following
bash script after executing the vcvars32.bat file included with VS.

#! /bin/bash

defname=rsidl.def
echo "LIBRARY rsidl" > $defname
echo "VERSION 1.0" >> $defname
echo "EXPORTS" >> $defname
DUMPBIN.EXE /SYMBOLS rsidls.lib | \
egrep '^[^ ]+ +[^ ]+ +SECT[^ ]+ +[^ ]+ +\(\) +External +\| +\?[^ ]*|^[^ ]+
+[^ ]+ +SECT[^ ]+ +[^ ]+ +External +\| +\?[^?][^ ]*'|\
egrep -v 'deleting destructor[^(]+\(unsigned int\)' | \
cut -d'|' -f2 | \
cut -d' ' -f2 | sort -u >> $defname

These commands were extracted from the omniORB make files.

3. Placed the rsidl.def file into the build directory for the DLL (in this
case the "release" directory")

4. Built the DLL I wanted by typing the following link option in the VS
"Project Option" box of the Link tab in the Project Settings dialog (this
in VS 5.0, the latest I have):
      /def:"release\rsidl.def"

5. The application which used this DLL has the preprocessor symbol
Use_stub_in_nt_dll defined before including the stub header files.

I did all of this for a proof-of-concept project only.  It works and
generated no link-time or run-time errors.  If it's easier than this I'd
like to know too.


Kendall



                                                                                                                                         
                      Le Flour Thierry                                                                                                   
                      <leflour at lapp.in2p3.fr>              To:       omniorb-list at omniorb-support.com                                    
                      Sent by:                             cc:                                                                           
                      omniorb-list-bounces at omniorb-        Fax to:                                                                       
                      support.com                          Subject:  [omniORB] Building a DLL                                            
                                                                                                                                         
                                                                                                                                         
                      10/21/2003 10:39 AM                                                                                                
                                                                                                                                         
                                                                                                                                         




Hello,
I am using OMNIORB4.0.1 and I woud like to produce a DLL(with Visual C++
6.0) for packaging the generated stubs.
I saw in the generated .hh file some line as :
    #ifndef  USE_core_stub_in_nt_dll
    # define USE_core_stub_in_nt_dll_NOT_DEFINED_BMM
    #endif
    #ifndef  USE_dyn_stub_in_nt_dll
    # define USE_dyn_stub_in_nt_dll_NOT_DEFINED_BMM
    #endif
but I don't know how to really use them to provide the DLL.
Any idea ?
Thanks for your help.
    Regards.

            Thierry Le Flour

--
---------------------------------------------------
Le Flour Thierry
Service Informatique
L.A.P.P. - BP 110, Chemin de Bellevue
74941 Annecy le Vieux cedex

Tel : 04.50.09.16.67 - Fax : 04.50.27.94.95
      04.50.09.16.00
email: leflour at lapp.in2p3.fr
---------------------------------------------------



_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list








More information about the omniORB-list mailing list