Hi Kevin,
After more investigations and discussions, it seems that this this issue
is not a general problem in Mico but something particular.
This time the compiler is right and we are wrong :)
You should not define the LongSeq by yourself and you should use instead
the predefined type from basic_seq.h.
See what the compiler says:
include\mico/basic_seq.h(178)
Status: Resolved: Wontfix ;)
[EMAIL PROTECTED] wrote:
That fixed it for me.
Kevin
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Sorin Mustaca
Sent: Monday, October 15, 2007 3:40 PM
To: mico-devel@mico.org
Subject: Re: [mico-devel] VS2005 compile problem
Hi,
I think I've found the problem.
However, before making the patch, I need your confirmation that it
really solves the problem until the end.
So, the change I've made is basically a simple method to differentiate
the symbols:
namespace Test
{
typedef SequenceTmpl< CORBA::Long,MICO_TID_DEF> LongSeq;
typedef TSeqVar< SequenceTmpl< CORBA::Long,MICO_TID_DEF> > LongSeq_var;
typedef TSeqOut< SequenceTmpl< CORBA::Long,MICO_TID_DEF> > LongSeq_out;
extern TESTEXPORT_EXPORT CORBA::TypeCodeConst _tc_LongSeq;
// } //moved below, after the definition of the global ops.
#ifndef MICO_CONF_NO_POA
#endif // MICO_CONF_NO_POA
TESTEXPORT_EXPORT void operator<<=( CORBA::Any &_a, const SequenceTmpl<
CORBA::Long,MICO_TID_DEF> &_s );
TESTEXPORT_EXPORT void operator<<=( CORBA::Any &_a, SequenceTmpl<
CORBA::Long,MICO_TID_DEF> *_s );
TESTEXPORT_EXPORT CORBA::Boolean operator>>=( const CORBA::Any &_a,
SequenceTmpl< CORBA::Long,MICO_TID_DEF> &_s );
TESTEXPORT_EXPORT CORBA::Boolean operator>>=( const CORBA::Any &_a,
const SequenceTmpl< CORBA::Long,MICO_TID_DEF> *&_s );
}
As you can see, I just moved the "}" after the definitions of the global
operators.
Please try to link your stuff this way.
Make sure you don't overwrite the test.h and cpp by recompiling the IDL
file again. Just recompile the generated code with the VSTUDIO compiler.
Let me know if it works in order to fix the idl compiler.
Sorin Mustaca wrote:
Hi,
Thanks for the report.
I'll have a look at this and send the patch to the list or
instructions
how to get the fix.
[EMAIL PROTECTED] wrote:
I am getting compile errors when using --any with --windows-dll-with
export when generating idl. I am using VS2005 with mico-070629.
Any
help would be appreciated.
Here is a test case that reproduces the error.
test.idl
module Test {
typedef sequence<long> LongSeq;
};
compile using
idl --poa --windows-dll-with-export TestExport --c++-suffix cpp --any
test.idl
cl /Od /I. /I"d:\mico\include" /DBUILD_TESTEXPORT_DLL /c test.cpp
E:\mico>cl /Od /I. /I"D:\mico\include" /DBUILD_TESTEXPORT_DLL /c
test.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
14.00.50727.762
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
C:\Program Files (x86)\Microsoft Visual Studio
8\VC\INCLUDE\xlocale(326) : warning C4530: C++ exception handler
used,
but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio
8\VC\INCLUDE\xlocale(341) : warning C4530: C++ exception handler
used,
but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio
8\VC\INCLUDE\xlocale(358) : warning C4530: C++ exception handler
used,
but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio
8\VC\INCLUDE\istream(1075) : warning C4530: C++ exception handler
used, but unwind semantics are not enabled. Specify /EHsc
.\test.h(52) : error C2375: 'operator <<=' : redefinition; different
linkage
D:\mico\include\mico/basic_seq.h(178) :
see
declaration of 'operator <<='
.\test.h(53) : error C2375: 'operator <<=' : redefinition; different
linkage
D:\mico\include\mico/basic_seq.h(180) :
see
declaration of 'operator <<='
.\test.h(54) : error C2375: 'operator >>=' : redefinition; different
linkage
D:\mico\include\mico/basic_seq.h(182) :
see
declaration of 'operator >>='
.\test.h(55) : error C2375: 'operator >>=' : redefinition; different
linkage
D:\mico\include\mico/basic_seq.h(184) :
see
declaration of 'operator >>='
Thanks,
Kevin
------------------------------------------------------------------------
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel
--
Best regards,
Sorin Mustaca
http://www.mustaca.de
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel