Windriver Workbench 3.1 Download

Windriver Workbench 3.1 Download Average ratng: 3,6/5 7308 reviews

In Visual Studio 2010, I was able to build enumeration with datatype just fine.

Return to windriver.com. Board Support Packages Platform: VxWorks: 6.8. 6.8 - Wind River Workbench 3.2: X86-64: Intel® Atom™ Z510 / Z530. Wind River Workbench 3.1 Download Windriver Workbench 3.1 Download. Software development and applications programmin on Linux. YoLinux: Linux.

However, when I tried to compile in WR Workbench, I get the following error:

Wind River Workbench By Example

: error: use of enum 'FRUIT_E' without previous declaration

I really need to specify the datatype of enum as fields are bitpacked. Is there any way I could explicitly specify the type of enumeration?

JustinJustin

1 Answer

The short answer to your question is no.

The ability to define a base type for enumerations is a language feature that was not added until C++11 (http://en.cppreference.com/w/cpp/language/enum). Unfortunately, WindRiver has been slow to support compilers that comply with modern C++ standards (C++ 11 in vxworks). There is mention of support for C++11 in commercial versions of g++ for VxWorks 7.0+ (https://stackoverflow.com/a/36311473). But, your WorkBench version (<4.0) implies that this won't be helpful to you.

River

In your situation, I might cobble together a work-around, such as this:

However, this won't provide type safety, as FRUIT_T is just an alias for UINT16. So, it's far from ideal. I've added tags to your question. There may be better work-arounds, emulating the desired behavior more closely. But, the addition of a new language feature would seem to indicate that existing methods were inadequate.

Wind River Workbench Manual

Community

Wind River Workbench Download

Cliff BilbreyCliff Bilbrey

Not the answer you're looking for? Browse other questions tagged c++c++11vxworkswind-river-workbench or ask your own question.