[Ace-users] [tao-bugs] MinGW Linking: undefined reference to members _narrow and release
Paul Koster
pckoster at zonnet.nl
Fri Feb 29 10:36:19 CST 2008
TAO VERSION: 1.6.2
ACE VERSION: 5.6.2
HOST MACHINE and OPERATING SYSTEM:
Windows XP SP2, Winsock 2, using MinGW's g++ version 3.4.5
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
config-win32.h
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
TAO_ORBSVCS = Naming Time Trader ImplRepo
debug=0
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
N/A
AREA/CLASS/EXAMPLE AFFECTED:
N/A
DOES THE PROBLEM AFFECT:
LINKING
SYNOPSIS:
Cannot link an application when stub and skeleton files are compiled into a
Windows DLL, using MinGW.
DESCRIPTION:
I'm trying to put generated stubs and skeletons into a Windows DLL, but it
fails when linking the application using the DLL, resulting in undefined
references to specific servant members.
This is the IDL file : (compiled with
tao_idl -in -Wb,export_macro=EXPORT_DLL -Wb,export_include=dllheader.h
nc.idl)
____________________________________________________________________________________
module type
{
typedef sequence<float> sampleData;
typedef sequence<sampleData> signalData;
typedef sequence<octet> binaryFile;
};
interface frameWorkBase
{
boolean running();
boolean terminate();
};
interface patientFileEngine : frameWorkBase
{
// Patient file binary file I/O
boolean loadBinaryFile(in string fileName, out type::binaryFile fileData);
boolean saveBinaryFile(in string fileName, in type::binaryFile fileData);
};
____________________________________________________________________________________
The DLL is created wihtout any problems, but when I link the application to
the stubs-DLL, it results into undefined references to the servant members
_narrow and release. The DLL and application are generated with the
appropriate import/export class attributes (EXPORT_DLL).
Below is the output of the linking process.
____________________________________________________________________________________
-LC:/ace/TAO/orbsvcs/orbsvcs -lACE.dll -lTAO.dll -lTAO_AnyTypeCode.dll -lTAO_Co
sNaming.dll -lTAO_ObjRefTemplate.dll -lTAO_PortableServer.dll -lws2_32 -lcommon
-leditor -lsharedwidget -lplotframework -L../../lib -lcorbaframework -lQtXml4 -l
QtOpenGL4 -lQtGui4 -lQtCore4
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0xf0c):
undefined
reference to `_imp___ZN17patientFileEngine7_narrowEPN5CORBA6ObjectE'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0xf52):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1044):
undefined
reference to `_imp___ZN17patientFileEngine7_narrowEPN5CORBA6ObjectE'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1091):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x12fc):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1356):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1833):
undefined
reference to `_imp___ZN17patientFileEngine7_narrowEPN5CORBA6ObjectE'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1874):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1bbe):
undefined
reference to `_imp___ZN17patientFileEngine7_narrowEPN5CORBA6ObjectE'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1c08):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1dc2):
undefined
reference to `_imp___ZN17patientFileEngine7_narrowEPN5CORBA6ObjectE'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x1e11):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x29b2):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x2aee):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
./.obj-win32/modulepatientfile.o:modulepatientfile.cpp:(.text+0x2bb1):
undefined
reference to `_imp___ZN3TAO13Objref_TraitsI17patientFileEngineE7releaseEPS1_'
etc, etc
____________________________________________________________________________________
REPEAT BY:
N/A
SAMPLE FIX/WORKAROUND:
N/A
More information about the Ace-users
mailing list