| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I'm trying to use some C++ libraries (dcmtk for reading DICOM files) in
our Objective-C/Cocoa app and, while I've got some basic C++-isms to
build and run (e.g. cout << "Hello World!" << endl;) I'm already having
trouble with some includes I need to use the actual libs. To get
"hello world" to work (I realize this doesn't exercise much C++), I
included iostream.h and gave my implementation file the .mm extension.
When I add the first include needed for dcmtk, the build starts failing
(see below).
Below are a list of the initial errors I'm getting. As I am a complete
C++ newbie, I'd be very grateful if anyone could give some hints as to
what is going on and how to fix it.
-----------------------
#error DCMTK needs stringstream or strstream type
(this is actually a header-generated message - I added an include for
/usr/include/gcc/darwin/3.3/c++/backward/strstream but this does not
abolish the above message. What is the correct way to include
str{ing}stream?)
------------------------
error: parse error before `:' token
(it seems to be balking at the C++ class declaration: class
OFConditionString: public OFConditionBase )
------------------------
warning: ISO C++ forbids declaration of `OFConditionString' with no type
(from these lines of code:
/// copy constructor
OFConditionString(const OFConditionString& arg)
: OFConditionBase(arg) // THIS GENERATES THE WARNING
, theCodeAndModule(arg.theCodeAndModule)
, theStatus(arg.theStatus)
, theText(arg.theText)
{
}
)
------------------------
error: only constructors take base initializers
(from this code:
/// copy constructor
OFConditionString(const OFConditionString& arg)
: OFConditionBase(arg) // THIS GENERATES THE ERROR
, theCodeAndModule(arg.theCodeAndModule)
, theStatus(arg.theStatus)
, theText(arg.theText)
{
}
)
------------------------
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.