473,561 Members | 3,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Has anyone used enum.h from Besser's ENUM++?

Hi,

I downloaded and tried the ENUM++ code from CUJ

http://www.cuj.com/documents/s=8470/cujboost0306besser/

but can't even get it to compile (see following). I
have also downloaded and installed the boost library.
This is using gcc under FC3.

Any ideas on what's wrong?

--Randy

PS: Besser's email, be******@yahoo. com, is
no longer valid.

#include "enum.h"
int main(int argc, char **argv)
{
return 0;
}

cd /home/yates/modetest/host/app/modetest/
make -f enumpp.mak TARGET=native PLATFORM=linux
DSPROOT_DIR=/home/yates/modetest/ ATSIGN=
enumpp.mak:101: no file name for `include'
Building Component (enumpp) for Application enumpp
In file included from
/home/yates/modetest/host/app/modetest/enum.h:202,
from
/home/yates/modetest/host/app/modetest/enumpp.cpp:1:
/home/yates/modetest/host/app/modetest/StreamUDT.h: In function
`std::basic_ost ream<_CharT, _Traits>&
KEA::stream_ins erter(std::basi c_ostream<_Char T, _Traits>&, const
UDT&)':
/home/yates/modetest/host/app/modetest/StreamUDT.h:96: error: expected
`;' before "prepost"
/home/yates/modetest/host/app/modetest/StreamUDT.h:97: error: `prepost'
undeclared (first use this function)
/home/yates/modetest/host/app/modetest/StreamUDT.h:97: error: (Each
undeclared identifier is reported only once for each function it
appears in.)
/home/yates/modetest/host/app/modetest/StreamUDT.h: In function
`std::basic_ist ream<_CharT, _Traits>&
KEA::stream_ext ractor(std::bas ic_istream<_Cha rT, _Traits>&, UDT&)':
/home/yates/modetest/host/app/modetest/StreamUDT.h:151 : error: expected
`;' before "prepost"
/home/yates/modetest/host/app/modetest/StreamUDT.h:152 : error:
`prepost' undeclared (first use this function)
In file included from
/home/yates/modetest/host/app/modetest/enumpp.cpp:1:
/home/yates/modetest/host/app/modetest/enum.h: At global scope:
/home/yates/modetest/host/app/modetest/enum.h:257: error: ISO C++
forbids declaration of `value_type' with no type
/home/yates/modetest/host/app/modetest/enum.h:257: error:
`::value_type' is not a valid declarator
/home/yates/modetest/host/app/modetest/enum.h:257: error: expected `;'
before "value_type "
/home/yates/modetest/host/app/modetest/enum.h:264: error: ISO C++
forbids declaration of `result_type' with no type
/home/yates/modetest/host/app/modetest/enum.h:264: error: expected `;'
before "operator"
/home/yates/modetest/host/app/modetest/enum.h:334: error: expected `;'
before '}' token
/home/yates/modetest/host/app/modetest/enum.h:338: error: ISO C++
forbids declaration of `result_type' with no type
/home/yates/modetest/host/app/modetest/enum.h:338: error: expected `;'
before "operator"
/home/yates/modetest/host/app/modetest/enum.h:344: error: expected `;'
before '}' token
/home/yates/modetest/host/app/modetest/enum.h:387: error: ISO C++
forbids declaration of `size_type' with no type
/home/yates/modetest/host/app/modetest/enum.h:387: error: `::size_type'
is not a valid declarator
/home/yates/modetest/host/app/modetest/enum.h:387: error: expected `;'
before "max_length "
/home/yates/modetest/host/app/modetest/enum.h:393: error: expected `;'
before "inline"
/home/yates/modetest/host/app/modetest/enum.h: In member function
`std::_Ios_Iost ate KEA::_EnumSuper <_enumType, EnumSub,
N>::get_stream( std::basic_istr eam<_CharT2, _Traits2>&)':
/home/yates/modetest/host/app/modetest/enum.h:761: error: expected
primary-expression before "const"
/home/yates/modetest/host/app/modetest/enum.h:761: error: expected `;'
before "const"
/home/yates/modetest/host/app/modetest/enum.h:768: error:
`start_position ' undeclared (first use this function)
/home/yates/modetest/host/app/modetest/enum.h: At global scope:
/home/yates/modetest/host/app/modetest/enum.h:789: error: expected
constructor, destructor, or type conversion before "_EnumSuper "
/home/yates/modetest/host/app/modetest/enum.h:789: error: expected `;'
before "_EnumSuper "
/home/yates/modetest/host/app/modetest/enum.h:805: error: expected
init-declarator before '&' token
/home/yates/modetest/host/app/modetest/enum.h:805: error: expected `;'
before '&' token
make: *** [/home/yates/modetest/host/app/modetest/nativelinux/enumpp.o]
Error 1

Compilation exited abnormally with code 2 at Fri Jan 6 11:41:16

Jan 7 '06 #1
2 2110
Randy wrote:
I downloaded and tried the ENUM++ code from CUJ
[...]


Randy, we heard you the first three times. If you've received no
response, it means either folks don't know the answer (like I, for
instance) or nobody is interested in sharing (although that is
rather unlikely). Repeating the question is not going to help.

Spend some time trying to figure it out, or wait a couple more days.
Another way is to post to comp.lang.c++.m oderated. More CUJ readers
and writers hang out there. But you will need to wait for your
answer there as well, moderators do need time to sift through many
posts and it does introduce some latency.

V
Jan 7 '06 #2
"Victor Bazarov" <v.********@com Acast.net> writes:
Randy wrote:
I downloaded and tried the ENUM++ code from CUJ
[...]
Randy, we heard you the first three times. If you've received no
response, it means either folks don't know the answer (like I, for
instance) or nobody is interested in sharing (although that is
rather unlikely). Repeating the question is not going to help.


Victor,

You've misinterpreted the situation - Google news was apparently hosed up
yesterday. I reposted because I never saw *my own* post(s).
Spend some time trying to figure it out, or wait a couple more days.
Another way is to post to comp.lang.c++.m oderated. More CUJ readers
and writers hang out there. But you will need to wait for your
answer there as well, moderators do need time to sift through many
posts and it does introduce some latency.


Thanks for the pointers, anyway, Victor.

PS Everyone: This problem has been (apparently and thankfully) solved
by MLimber but I can't try it until I get back to work on Monday. Thanks
for all your responses and help. I'll post a follow-up as soon as I can
get things to work.

Also, note that Mr. Besser's email address (be******@yahoo .com) is no
longer valid. Does anyone have an updated address for him?
--
% Randy Yates % "Ticket to the moon, flight leaves here today
%% Fuquay-Varina, NC % from Satellite 2"
%%% 919-577-9882 % 'Ticket To The Moon'
%%%% <ya***@ieee.org > % *Time*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
Jan 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6531
by: Lars-Erik Aabech | last post by:
Hi! I've got problems with serializing my collections of business objects. The objects themselves serialize fine, but the collections fail. I've got the following structure: Base collection class: Derives MarshalByValueComponent Implements ICollection, IList and ISerializable Explicitly implements the IList methods as private members,...
5
9622
by: Francois Grieu | last post by:
Can an enum be used as an array size? In other word, is this legal? enum {n=1}; int a; int main(void){return a;} TIA
31
3576
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1(); Control c = f; An enum value inherits from int but it doesn't get implicitly converted: HorizontalAlignment h = HorizontalAlignment.Center;
9
1386
by: cody | last post by:
Why can't switch used for objects, at least for static readonly fields it wold be nice. The Jit could certainly optimize this case because the addresses of static readonly variables are known at jit time. The thing is that is often used my own enum classes because I usually want to assign a userfriendly (and localizable) name to an enum...
6
5016
by: CarlEOgden | last post by:
Hi, I've found this example but when I try to rework it for VB.Net I fail with the API calls and the CopyMemory procedure and to be truthful, it's far over my skill level with the getting information from buffers etc, all I've ever done with these is hack code around to get them working!!! Many thanks with any and all help given.
8
1550
by: Siv | last post by:
Hi, Does anyone have a function that when called returns which operating system we are running on. E.g: Select Case GetOSVer() Case 1 'Win95 ... Case 2 'Win98 ... Case 3 'Win98SE
10
3876
by: Randy | last post by:
Hi, Can anyone point me to a complete, compilable example of Besser's ENUM++ mechanism? I downloaded it from CUJ and gave it a try but got errors just trying to compile the header enum.h. --Randy Yates
3
2114
by: Jens Müller | last post by:
I have a file here with several enums: #ifndef PLANARSEP_OPTIMIZE_H #define PLANARSEP_OPTIMIZE_H enum fund_cycle_behavior_t {PASS_MODE_FIRST, PASS_MODE_BEST, PASS_MODE_ALL};
2
1459
by: =?Utf-8?B?ZGlhdG9tQG5ld3Nncm91cC5ub3NwYW0=?= | last post by:
Hello, I would like to create an enum that can be used accross all the classes in my windows solution. How can I do this. TROUBLESHOOTING I created a new .cs file in my windows solution. I call it Enumerations.cs. In this file I have written the following... using System;
0
7568
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7614
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6206
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5185
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3598
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1180
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
892
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.