473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems Compiling enum.h from 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

#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_ostream<_CharT, _Traits>&
KEA::stream_inserter(std::basic_ostream<_CharT, _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_istream<_CharT, _Traits>&
KEA::stream_extractor(std::basic_istream<_CharT, _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_Iostate KEA::_EnumSuper<_enumType, EnumSub,
N>::get_stream(std::basic_istream<_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
1 2432
On 6 Jan 2006 08:45:41 -0800 in comp.lang.c++, "Randy"
<ya***@ieee.org> wrote,
Hi,

I downloaded and tried the ENUM++ code from CUJ

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


OK, I looked at the article. I did not find the link to download
the header, and so I still haven't tried it. Perhaps you can make
it easy for people to help you by pointing out the download URL (all
of them needed to replicate your problem) as well. You are asking
your readers to do too much digging.

Based on the general nature of the errors you posted, my guess is
that "enum.h" assumes some prior includes that the author probably
didn't even think much about. See if you can figure out where
"prepost" is supposed to be defined. Try #include <iostream> prior
to "enum.h" just to see if it makes any difference at all.
Jan 7 '06 #2

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

Similar topics

1
by: Azzedine | last post by:
Dear All, I compiled a project under Unix, I have got the following errors: ------------------------------------------ CC -I. -DUNIX -c XPCFileStat.C -g -o XPCFileStat.o "XPCFileStat.C",...
13
by: SpaceCowboy | last post by:
I recently got into a discussion with a co-worker about using enums across a dll interface. He wanted to use chars instead, argueing that depending on compiler settings the size of an enum could...
0
by: Francisco J. Reyes | last post by:
I get an Internal complier error when compiling C# windows project that uses a custom Class add as reference to the project. The problem appears to be related to the ENUM type used in the class...
9
by: Lawrence Oluyede | last post by:
I have a list of strings and i'd like to build up an enum from them... is there a way to do that? Thanks in advance. -- Lawrence "Rhymes" Oluyede http://loluyede.blogspot.com
6
by: David | last post by:
Hi, namespace EnumTest { class Class1 { public enum num { one = 1, uno = 1,
2
by: tzvika.visman | last post by:
I write a MC++ wrapper for our company internal SDK that wrote in C++ native code for writing application with this SDK over C# and other .NET languages and most of my SDK API function return a...
1
by: vasant63 | last post by:
Hi, This is the compilation errors which I am getting when I compiling the code with VC++ 6.0. The same code is getting compiled in Linux OS. I would like to know how this compiler error can be...
10
by: Cliff | last post by:
Greetings, I have been trying to teach myself C++ over the past few weeks and have finally came across a problem I could not fix. I made a simple program that prints out a square or rectangle...
2
by: medrifter | last post by:
I have a program like this 1.Analyze.h as follows #if !defined(AFX_ANALYZE_H__550791A7_B441_4AD3_BCEB_4F391A71D410__INCLUDED_) #define...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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,...

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.