[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
enum declare in shared library
From: |
rjj |
Subject: |
enum declare in shared library |
Date: |
Sat, 13 Oct 2007 14:02:22 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
All -
Using eclipse 3.3, CDT 4.0.1, ACE 5.6.1, mac osx 10.4
I'm trying to port an existing project that I had previously build to
compile with common source code on both linux and windows. It would
great there. I porting this to my mac.
I'm building a number of shared libraries, and I'm running in to g++
compilation error on a declaration of an enum that is exported from the
shared library.
Any help will be most appreciated.
C++ source:
enum ANSG_ENTITY_Export EVOLUTION_STATE
{
NONCONTRIBUTING =0, ///< Indicates the line is not contributable.
RISEONSETDELAY, ///< indicates that we are in a Rise Onset delay
RISECYC, ///< Repeating line
RISEACC, ///< Non-repeating line, acceleration
RISEDEC, ///< Non-repeating line, deceleration
RUNONSETDELAY,
RUN, ///< Applicable to all lines
FALL, ///< Only applicable to repeating lines
TERMINATEDELAY, ///< We are in a terminate delay state
TERMINATE ///< Enter after losing eligibility
};
Using -E as a preprocessor option, this expands to:
enum __attribute__ ((visibility("default"))) EVOLUTION_STATE
{
NONCONTRIBUTING =0,
RISEONSETDELAY,
RISECYC,
RISEACC,
RISEDEC,
RUNONSETDELAY,
RUN,
FALL,
TERMINATEDELAY,
TERMINATE
};
And on compilation, I get these errors:
Building file: ../SpeedFreq.cpp
Invoking: GCC C++ Compiler
g++ -DMACOSX -D_DEBUG -D_USRDLL -DENTITY_EXPORTS -DANSG_ENTITY_BUILD_DLL
-I"/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/utility"
-I"/usr/local/ace/ACE_ROOT"
-I"/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator" -O0 -g3
-Wall -c -fmessage-length=0 -MMD -MP -MF"SpeedFreq.d" -MT"SpeedFreq.d"
-o"SpeedFreq.o" "../SpeedFreq.cpp"
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:24:
warning: type attributes are honored only at type definition
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:24:
error: use of enum 'EVOLUTION_STATE' without previous declaration
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:25:
error: expected unqualified-id before '{' token
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:40:
error: use of enum 'EVOLUTION_STATE' without previous declaration
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:43:
error: use of enum 'EVOLUTION_STATE' without previous declaration
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:49:
warning: type attributes are honored only at type definition
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:49:
error: use of enum 'ANGroupType' without previous declaration
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:50:
error: expected unqualified-id before '{' token
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:60:
error: use of enum 'ANGroupType' without previous declaration
/Users/rjj/dev/projs/ansg/anSignalGen/src/anSignalGenerator/entity/ANSG_ENTITY_COMMON.h:63:
error: use of enum 'ANGroupType' without previous declaration
../ANSG_ENTITY_COMMON.cpp:17: error: use of enum 'EVOLUTION_STATE'
without previous declaration
../ANSG_ENTITY_COMMON.cpp: In function 'std::ostream&
operator<<(std::ostream&, int)':
../ANSG_ENTITY_COMMON.cpp:22: error: 'NONCONTRIBUTING' was not declared
in this scope
../ANSG_ENTITY_COMMON.cpp:25: error: 'RISEONSETDELAY' was not declared
in this scope
../ANSG_ENTITY_COMMON.cpp:28: error: 'RISECYC' was not declared in this
scope
../ANSG_ENTITY_COMMON.cpp:31: error: 'RISEACC' was not declared in this
scope
../ANSG_ENTITY_COMMON.cpp:34: error: 'RISEDEC' was not declared in this
scope
../ANSG_ENTITY_COMMON.cpp:37: error: 'RUNONSETDELAY' was not declared in
this scope
../ANSG_ENTITY_COMMON.cpp:40: error: 'RUN' was not declared in this scope
../ANSG_ENTITY_COMMON.cpp:43: error: 'FALL' was not declared in this scope
../ANSG_ENTITY_COMMON.cpp:46: error: 'TERMINATEDELAY' was not declared
in this scope
../ANSG_ENTITY_COMMON.cpp:49: error: 'TERMINATE' was not declared in
this scope
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- enum declare in shared library,
rjj <=