[omniORB] OmniORB wilth DLL

Ulf Stoermer ulf at emi.yamaha.co.jp
Tue Sep 28 10:42:09 BST 2004


Okay, admittedly I read the first posting a bit carelessly.

But then, in this case the ORB_var is private, so there is no need
to export the symbol. The __declspec can also be used selectively
on individual class members, e.g.

class Object
{
private:
  CORBA::ORB_var orb;
public:
  void __declspec(dllexport) doWhatever();
  ...
} 

Cheers

Ulf

> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com
> [mailto:omniorb-list-bounces at omniorb-support.com]On Behalf Of Jan
> Olderdissen
> Sent: Tuesday, 28 September 2004 2:38 AM
> To: OmniORB
> Subject: RE: [omniORB] OmniORB wilth DLL
> 
> 
> While Microsoft's documentation describes the source of the problem in some
> detail, there remains an omniORB specific issue: omniidl does not have
> facilities to generate stubs and skeletons with __declspec(export)
> decoration.
> 
> The only solution that I'm aware of is documented here:
> 
> http://www.omniorb-support.com/pipermail/omniorb-list/2003-October/024387.ht
> ml
> 
> Jan
> 
> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com
> [mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Ulf Stoermer
> Sent: Sunday, September 26, 2004 5:27 PM
> To: OmniORB
> Subject: RE: [omniORB] OmniORB wilth DLL
> 
> Hi,
> 
> your problem isn't specific to OmniORB and
> is the same with any Windows DLL. By default
> the Windows compiler doesn't export any symbols
> from your library. Instead you have to tell explicitly
> which symbols you want to have exported.
> Have a look at the Microsoft online documentation:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html
> /_core_export_from_a_dll
> _using___declspec.28.dllexport.29.asp
> 
> Cheers
> 
> Ulf
> 
> 
> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com
> [mailto:omniorb-list-bounces at omniorb-support.com]On
> Behalf Of concat833 at yahoo.com
> Sent: Friday, 24 September 2004 11:26 PM
> To: omniorb-list at omniorb-support.com
> Subject: [omniORB] OmniORB wilth DLL
> 
> 
> Hi all,
> I want to create DLL files with OmniORB.
> I have a class
> class __declspec(dllexport) Object
> {
> private:
>  CORBA::ORB_var orb;
> ...
> ...
> }
> 
> When I compile, there's warning:
> warning C4251: 'orb' : class 'CORBA::ORB_var' needs to have dll-interface to
> be used by clients of
> class 'Object'
>         d:\programs\omniorb-4.0.4\include\omniorb4\corba_vartypes.h(191) :
> see declaration of
> 'ORB_var'
> 
> How can I solve this problem.
> Thanks in advance for any help.
> Tran Phuong Nga
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 
> _______________________________________________
> 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