Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C++ newbie questions



On Jun 02, 2004, at 10:04, Rick Hoge wrote:

> Hi -
>
> 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?)

I would look in the header to see exactly what condition is generating
this error (i.e. what are the #if/#ifdef's that the header uses to come
to this conclusion?)


>
> ------------------------
>
> error: parse error before `:' token
>
> (it seems to be balking at the C++ class declaration: class
> OFConditionString: public OFConditionBase )

My guess is that there is something going wrong on the line before this
(missing semicolon?). I would think that all of the following errors
result from this one.

--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Objective-C++ newbie questions (From: Rick Hoge <email@hidden>)



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.