Discussion:
[omniORB] Unresolved token problem
Perham, David A. (Mission Systems)
2007-04-04 03:34:06 UTC
Permalink
Howdy:

I have the following methods defined in IDL:

typedef struct EntityTypeAttributesData
{
string<100> TypeName ;
short TypeRange ;
short TypeCount ;
} EntityWeaponTypeAttributesDataType ;

typedef struct EntityAttributesData
{
string<100> EntityName ;
long EntityCount ;
} EntityAttributesDataType ;

boolean RequestEntityTypeAttributes( in short ClassHandle, out
EntityTypeAttributesDataType TypeAttributes ) ;

boolean RequestEntityAttributes( in long EntityId, out
EntityAttributesDataType EntityAttributes ) ;


In the Implementation class I have the following method declarations
(also the bodies) :


bool RequestEntityWeaponTypeAttributes( short ClassHandle,
EntityTypeAttributesDataType_out TypeAttributes ) ;

bool RequestEntityAttributes( long EntityId,
EntityAttributesDataType_out EntityAttributes ) ;

Yet when I attempt to build, I get the following link errors:

LINK : error LNK2020: unresolved token (0A00002C)
ObjectServerImpl.RequestEntityWeaponAttributes
LINK : error LNK2020: unresolved token (0A00002D)
ObjectServerImpl.RequestEntityWeaponTypeAttributes
LINK : fatal error LNK1120: 2 unresolved externals


What am I missing?

Thanks,
Dave P






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070403/6d989029/attachment.htm
Perham, David A. (Mission Systems)
2007-04-04 03:41:27 UTC
Permalink
I forgot to add that I could link if I changed the "out" parameters to
"inout," and adjust the implementation class appropiately.
Post by Perham, David A. (Mission Systems)
typedef struct EntityTypeAttributesData
{
string<100> TypeName ;
short TypeRange ;
short TypeCount ;
} EntityWeaponTypeAttributesDataType ;
typedef struct EntityAttributesData
{
string<100> EntityName ;
long EntityCount ;
} EntityAttributesDataType ;
boolean RequestEntityTypeAttributes( in short ClassHandle, out
EntityTypeAttributesDataType TypeAttributes ) ;
boolean RequestEntityAttributes( in long EntityId, out
EntityAttributesDataType EntityAttributes ) ;
In the Implementation class I have the following method declarations
bool RequestEntityWeaponTypeAttributes( short ClassHandle,
EntityTypeAttributesDataType_out TypeAttributes ) ;
bool RequestEntityAttributes( long EntityId,
EntityAttributesDataType_out EntityAttributes ) ;
LINK : error LNK2020: unresolved token (0A00002C)
ObjectServerImpl.RequestEntityWeaponAttributes
LINK : error LNK2020: unresolved token (0A00002D)
ObjectServerImpl.RequestEntityWeaponTypeAttributes
LINK : fatal error LNK1120: 2 unresolved externals
What am I missing?
Thanks,
Dave P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070403/51a535de/attachment.htm
Perham, David A. (Mission Systems)
2007-04-04 22:32:19 UTC
Permalink
Howdy:

Upon further study I've learned that this problem only occurs when the
structure parameter contains string or sequence members, even if they
are bound.
Is there a workaround for this?

I am building a Forms project in Visual C++ V.7 in a .NET
environment--is that not supported by omniorb?
Post by Perham, David A. (Mission Systems)
I forgot to add that I could link if I changed the "out" parameters to
"inout," and adjust the implementation class appropiately.
typedef struct EntityTypeAttributesData
{
string<100> TypeName ;
short TypeRange ;
short TypeCount ;
} EntityWeaponTypeAttributesDataType ;
typedef struct EntityAttributesData
{
string<100> EntityName ;
long EntityCount ;
} EntityAttributesDataType ;
boolean RequestEntityTypeAttributes( in short ClassHandle, out
EntityTypeAttributesDataType TypeAttributes ) ;
boolean RequestEntityAttributes( in long EntityId, out
EntityAttributesDataType EntityAttributes ) ;
In the Implementation class I have the following method declarations
bool RequestEntityTypeAttributes( short ClassHandle,
EntityTypeAttributesDataType_out TypeAttributes ) ;
bool RequestEntityAttributes( long EntityId,
EntityAttributesDataType_out EntityAttributes ) ;
LINK : error LNK2020: unresolved token (0A00002C)
ObjectServerImpl.RequestEntityWeaponAttributes
LINK : error LNK2020: unresolved token (0A00002D)
ObjectServerImpl.RequestEntityWeaponTypeAttributes
LINK : fatal error LNK1120: 2 unresolved externals
What am I missing?
Thanks,
Dave P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070404/94ae911a/attachment-0001.htm
Carlos
2007-04-08 17:23:19 UTC
Permalink
El mi?, 04-04-2007 a las 09:31 -0700, Perham, David A. (Mission Systems)
Post by Perham, David A. (Mission Systems)
Upon further study I've learned that this problem only occurs when the
structure parameter contains string or sequence members, even if they
are bound.
Is there a workaround for this?
I am building a Forms project in Visual C++ V.7 in a .NET
environment--is that not supported by omniorb?
I forgot to add that I could link if I changed the "out" parameters to
"inout," and adjust the implementation class appropiately.
typedef struct EntityTypeAttributesData
{
string<100> TypeName ;
short TypeRange ;
short TypeCount ;
} EntityWeaponTypeAttributesDataType ;
typedef struct EntityAttributesData
{
string<100> EntityName ;
long EntityCount ;
} EntityAttributesDataType ;
boolean RequestEntityTypeAttributes( in short ClassHandle, out
EntityTypeAttributesDataType TypeAttributes ) ;
boolean RequestEntityAttributes( in long EntityId, out
EntityAttributesDataType EntityAttributes ) ;
In the Implementation class I have the following method declarations
bool RequestEntityTypeAttributes( short ClassHandle,
EntityTypeAttributesDataType_out TypeAttributes ) ;
bool RequestEntityAttributes( long EntityId,
EntityAttributesDataType_out EntityAttributes ) ;
LINK : error LNK2020: unresolved token (0A00002C)
ObjectServerImpl.RequestEntityWeaponAttributes
LINK : error LNK2020: unresolved token (0A00002D)
ObjectServerImpl.RequestEntityWeaponTypeAttributes
LINK : fatal error LNK1120: 2 unresolved externals
Hi all:

I am not sure but I think you have defined two methods
RequestEntityWeaponAttributes and RequestEntityWeaponTypeAttributes that
are not implemented or and if you defined and deleted them from idl
source a recompilation problem.

Cheers.

Carlos.
Post by Perham, David A. (Mission Systems)
What am I missing?
Thanks,
Dave P
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Luke Deller
2007-04-04 12:09:03 UTC
Permalink
Hi Dave,

I can't spot the problem with your code snippets, besides the mismatched names:
IDL: C++:
EntityWeaponTypeAttributesDataType EntityTypeAttributesDataType
RequestEntityTypeAttributes RequestEntityWeaponTypeAttributes

I had a look at the msdn docs for LNK2020 and it appears to me that it's specific to managed code... you're not trying to build managed code for use with the .NET runtime are you? OmniORB is written for C++, and Microsoft's managed C++ is just not the same.

Luke.
**********************************************************************************************
Important Note
This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the information provided before loading onto any computer system.
Xplan Technology does not warrant that the information is free of a virus or any other defect or error.
**********************************************************************************************
Perham, David A. (Mission Systems)
2007-04-04 21:24:19 UTC
Permalink
Yes those differences are typoes in the email and not the cause of the
problem.

I am indeed building a managed code project. Omniorb was chosen because
the documentation on the sourceforge website indicated that it supported
Visual C++ version 5 and greater.
It didn't occur to us that this would be exclusive of the .NET
environment, since MS seems to tie them together pretty tightly.

Sigh.

-----Original Message-----
From: Luke Deller [mailto:***@xplantechnology.com]
Sent: Tuesday, April 03, 2007 11:09 PM
To: Perham, David A. (Mission Systems)
Cc: omniorb-***@omniorb-support.com
Subject: RE: [omniORB] Unresolved token problem

Hi Dave,

I can't spot the problem with your code snippets, besides the mismatched
names:
IDL: C++:
EntityWeaponTypeAttributesDataType EntityTypeAttributesDataType
RequestEntityTypeAttributes RequestEntityWeaponTypeAttributes

I had a look at the msdn docs for LNK2020 and it appears to me that it's
specific to managed code... you're not trying to build managed code for
use with the .NET runtime are you? OmniORB is written for C++, and
Microsoft's managed C++ is just not the same.

Luke.
************************************************************************
**********************
Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not the
intended recipient you must not use, distribute or copy this email. If
you have received this email in error please notify the sender
immediately and delete this email. Any views expressed in this email are
not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the information is free of a
virus or any other defect or error.
************************************************************************
**********************
Luke Deller
2007-04-05 06:13:52 UTC
Permalink
Yes omniorb only supports native C++ not managed C++. These are essentially two different languages which target completely different platforms. I think it is confusing that the same compiler supports both of these, and doubly confusing that this compiler's name contains the brand ".NET".

If you're trying to write something for the .NET runtime which integrates with an existing CORBA service, you might like to check out:
http://iiop-net.sourceforge.net/

For a system which is exclusively written for the .NET runtime, you'd be better off using the SOAP-based distributed object model that is integrated with .NET

Regards,
Luke.

-----Original Message-----
...
I am indeed building a managed code project. Omniorb was chosen because
the documentation on the sourceforge website indicated that it supported
Visual C++ version 5 and greater.
It didn't occur to us that this would be exclusive of the .NET
environment, since MS seems to tie them together pretty tightly.

Sigh.
**********************************************************************************************
Important Note
This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the information provided before loading onto any computer system.
Xplan Technology does not warrant that the information is free of a virus or any other defect or error.
**********************************************************************************************
Loading...