Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, February 2008
Mac Frameworks in QT Project


Message 1 in thread

Hi Guys,

I am using Mac's framework named
"System/Library/Frameworks/DiscRecording.framework" in my qt App. For
this I added 2 lines in .pro file.

QMAKE_LFLAGS += -L/System/Library/Frameworks/DiscRecording
LIBS += -framework DiscRecording

In one of my header file I included this framework e.g
#include "DiscRecording/DiscRecording.h" // Including master header file
for the framework

but when I try to create object of one of the class on that framework
"e.g DRDevice obj", I am getting this error:
"error: 'DRDevice' does not name a type"

How to remove this error

Regards,
Manoj

--
 [ signature omitted ] 

Message 2 in thread

Manoj Agrawal wrote:
> Hi Guys,
> 
> I am using Mac's framework named
> "System/Library/Frameworks/DiscRecording.framework" in my qt App. For
> this I added 2 lines in .pro file.
> 
> QMAKE_LFLAGS += -L/System/Library/Frameworks/DiscRecording
> LIBS += -framework DiscRecording
> 
> In one of my header file I included this framework e.g
> #include "DiscRecording/DiscRecording.h" // Including master header file
> for the framework
> 
> but when I try to create object of one of the class on that framework
> "e.g DRDevice obj", I am getting this error:
> "error: 'DRDevice' does not name a type"

This doesn't seem to have anything to do with Qt.

It looks like the DRDevice class isn't declared in the the
header file that you've included, or perhaps that it's
declared in a namespace that you haven't imported via
a using declaration. Take a look at DiscRecording.h
to see exactly what's in there.

-- 
 [ signature omitted ] 

Message 3 in thread

Hi Stephen,

Thank you for your response. You are right, The DRDevice is included 
under #ifdef __ObjC_ preprocessor.
What do you mean by "imported via a using declaration"?

Regards,
Manoj

Stephen Collyer wrote:
> Manoj Agrawal wrote:
>> Hi Guys,
>>
>> I am using Mac's framework named
>> "System/Library/Frameworks/DiscRecording.framework" in my qt App. For
>> this I added 2 lines in .pro file.
>>
>> QMAKE_LFLAGS += -L/System/Library/Frameworks/DiscRecording
>> LIBS += -framework DiscRecording
>>
>> In one of my header file I included this framework e.g
>> #include "DiscRecording/DiscRecording.h" // Including master header file
>> for the framework
>>
>> but when I try to create object of one of the class on that framework
>> "e.g DRDevice obj", I am getting this error:
>> "error: 'DRDevice' does not name a type"
> 
> This doesn't seem to have anything to do with Qt.
> 
> It looks like the DRDevice class isn't declared in the the
> header file that you've included, or perhaps that it's
> declared in a namespace that you haven't imported via
> a using declaration. Take a look at DiscRecording.h
> to see exactly what's in there.
> 

--
 [ signature omitted ] 

Message 4 in thread

Manoj Agrawal wrote:
> Hi Stephen,
> 
> Thank you for your response. You are right, The DRDevice is included
> under #ifdef __ObjC_ preprocessor.
> What do you mean by "imported via a using declaration"?

If you have declarations is a namespace, like this:

namespace ABC
{

class DRDevice
{
...
}

}

then outside of the namespace, you must refer to DRDevice with a
namespace qualification like this:

ABC::DRDevice(..)

If this is too painful, you can import names from a namespace
with a using declaration. There is also a using directive, to
import all of the names from a namespace, should you so wish.

However, given that this is off-topic for this group, I'd
direct you to your favourite C++ text for the details.

-- 
 [ signature omitted ] 

Message 5 in thread

Hi Stephen,

Thanks for your time but I could still not make it. I am attaching the 
DiscBurning framework for your reference. May be, this gives you an 
clearer idea of how the framework classes are organized here!

I have removed some part from framework to make it smaller and only 
header files are included.

Regards,
Manoj

Stephen Collyer wrote:
> Manoj Agrawal wrote:
>> Hi Stephen,
>>
>> Thank you for your response. You are right, The DRDevice is included
>> under #ifdef __ObjC_ preprocessor.
>> What do you mean by "imported via a using declaration"?
> 
> If you have declarations is a namespace, like this:
> 
> namespace ABC
> {
> 
> class DRDevice
> {
> ...
> }
> 
> }
> 
> then outside of the namespace, you must refer to DRDevice with a
> namespace qualification like this:
> 
> ABC::DRDevice(..)
> 
> If this is too painful, you can import names from a namespace
> with a using declaration. There is also a using directive, to
> import all of the names from a namespace, should you so wish.
> 
> However, given that this is off-topic for this group, I'd
> direct you to your favourite C++ text for the details.
> 

Attachment:

Attachment: DiscRecording.framework.7z
Description: Binary data


Message 6 in thread

I request some trolls to step into this issue as I am really stuck here!!



Manoj Agrawal wrote:
> Hi Stephen,
> 
> Thanks for your time but I could still not make it. I am attaching the 
> DiscBurning framework for your reference. May be, this gives you an 
> clearer idea of how the framework classes are organized here!
> 
> I have removed some part from framework to make it smaller and only 
> header files are included.
> 
> Regards,
> Manoj
> 
> Stephen Collyer wrote:
>> Manoj Agrawal wrote:
>>> Hi Stephen,
>>>
>>> Thank you for your response. You are right, The DRDevice is included
>>> under #ifdef __ObjC_ preprocessor.
>>> What do you mean by "imported via a using declaration"?
>>
>> If you have declarations is a namespace, like this:
>>
>> namespace ABC
>> {
>>
>> class DRDevice
>> {
>> ...
>> }
>>
>> }
>>
>> then outside of the namespace, you must refer to DRDevice with a
>> namespace qualification like this:
>>
>> ABC::DRDevice(..)
>>
>> If this is too painful, you can import names from a namespace
>> with a using declaration. There is also a using directive, to
>> import all of the names from a namespace, should you so wish.
>>
>> However, given that this is off-topic for this group, I'd
>> direct you to your favourite C++ text for the details.
>>

--
 [ signature omitted ] 

Message 7 in thread

On torsdag den 7. Februar 2008, Manoj Agrawal wrote:
> I request some trolls to step into this issue as I am really stuck here!!

support@xxxxxxxxxxxxxx This mailing list is a community driven service, not a 
place to ask for Trolltech support.

Bo.

> Manoj Agrawal wrote:
> > Hi Stephen,
> >
> > Thanks for your time but I could still not make it. I am attaching the
> > DiscBurning framework for your reference. May be, this gives you an
> > clearer idea of how the framework classes are organized here!
> >
> > I have removed some part from framework to make it smaller and only
> > header files are included.
> >
> > Regards,
> > Manoj
> >
> > Stephen Collyer wrote:
> >> Manoj Agrawal wrote:
> >>> Hi Stephen,
> >>>
> >>> Thank you for your response. You are right, The DRDevice is included
> >>> under #ifdef __ObjC_ preprocessor.
> >>> What do you mean by "imported via a using declaration"?
> >>
> >> If you have declarations is a namespace, like this:
> >>
> >> namespace ABC
> >> {
> >>
> >> class DRDevice
> >> {
> >> ...
> >> }
> >>
> >> }
> >>
> >> then outside of the namespace, you must refer to DRDevice with a
> >> namespace qualification like this:
> >>
> >> ABC::DRDevice(..)
> >>
> >> If this is too painful, you can import names from a namespace
> >> with a using declaration. There is also a using directive, to
> >> import all of the names from a namespace, should you so wish.
> >>
> >> However, given that this is off-topic for this group, I'd
> >> direct you to your favourite C++ text for the details.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/



-- 
 [ signature omitted ] 

Message 8 in thread

On 7 Feb 2008, at 8:19 am, Manoj Agrawal wrote:

> I request some trolls to step into this issue as I am really stuck  
> here!!

This isn't a Qt issue, it's a question of understanding frameworks  
and languages on OS X.

>
>
>
> Manoj Agrawal wrote:
>> Hi Stephen,
>> Thanks for your time but I could still not make it. I am attaching  
>> the DiscBurning framework for your reference. May be, this gives  
>> you an clearer idea of how the framework classes are organized here!
>> I have removed some part from framework to make it smaller and  
>> only header files are included.
>> Regards,
>> Manoj
>> Stephen Collyer wrote:
>>> Manoj Agrawal wrote:
>>>> Hi Stephen,
>>>>
>>>> Thank you for your response. You are right, The DRDevice is  
>>>> included
>>>> under #ifdef __ObjC_ preprocessor.

That makes it clear (as does the documentation for DRDevice, if  
you've read it) that this is an Objective-C/Cocoa class. So if you  
want to use it, your source will need to be compiled with the Obj-C  
or Obj-C++ compiler. (E.g., give the source file the .mm extension.)  
And of course you'll need to use Objective-C to communicate with the  
DRDevice instances.

I don't know whether that's what you really want to do; there may be  
pitfalls involved in mixing Qt and Cocoa, but I expect it can be done.

Alternatively, perhaps you should be looking at Core Foundation-based  
options such as DRDeviceRef. (See DRCoreDevice.h.)

JK

--
 [ signature omitted ] 

Message 9 in thread

Ok,I agree. Can you help me that way!!

Jonathan Kew wrote:
> On 7 Feb 2008, at 8:19 am, Manoj Agrawal wrote:
> 
>> I request some trolls to step into this issue as I am really stuck here!!
> 
> This isn't a Qt issue, it's a question of understanding frameworks and 
> languages on OS X.
> 
>>
>>
>>
>> Manoj Agrawal wrote:
>>> Hi Stephen,
>>> Thanks for your time but I could still not make it. I am attaching 
>>> the DiscBurning framework for your reference. May be, this gives you 
>>> an clearer idea of how the framework classes are organized here!
>>> I have removed some part from framework to make it smaller and only 
>>> header files are included.
>>> Regards,
>>> Manoj
>>> Stephen Collyer wrote:
>>>> Manoj Agrawal wrote:
>>>>> Hi Stephen,
>>>>>
>>>>> Thank you for your response. You are right, The DRDevice is included
>>>>> under #ifdef __ObjC_ preprocessor.
> 
> That makes it clear (as does the documentation for DRDevice, if you've 
> read it) that this is an Objective-C/Cocoa class. So if you want to use 
> it, your source will need to be compiled with the Obj-C or Obj-C++ 
> compiler. (E.g., give the source file the .mm extension.) And of course 
> you'll need to use Objective-C to communicate with the DRDevice instances.
> 
> I don't know whether that's what you really want to do; there may be 
> pitfalls involved in mixing Qt and Cocoa, but I expect it can be done.
> 
> Alternatively, perhaps you should be looking at Core Foundation-based 
> options such as DRDeviceRef. (See DRCoreDevice.h.)
> 
> JK
> 
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 10 in thread

On 7 Feb 2008, at 9:32 am, Manoj Agrawal wrote:

> Ok,I agree. Can you help me that way!!

Sorry, I don't know anything about the DiscRecording stuff (except  
that I can see that DRDevice is Obj-C!).

Read the documentation and headers for the plain C APIs.

If you need specific advice after that, it's probably best to look  
for relevant Apple mailing lists, as it's really not a Qt question at  
that point. Looking at http://lists.apple.com, I see there's even a  
DiscRecording mailing list... that might be useful if you're stuck.

Regards,

JK

>
> Jonathan Kew wrote:
>> On 7 Feb 2008, at 8:19 am, Manoj Agrawal wrote:
>>> I request some trolls to step into this issue as I am really  
>>> stuck here!!
>> This isn't a Qt issue, it's a question of understanding frameworks  
>> and languages on OS X.
>>>
>>>
>>>
>>> Manoj Agrawal wrote:
>>>> Hi Stephen,
>>>> Thanks for your time but I could still not make it. I am  
>>>> attaching the DiscBurning framework for your reference. May be,  
>>>> this gives you an clearer idea of how the framework classes are  
>>>> organized here!
>>>> I have removed some part from framework to make it smaller and  
>>>> only header files are included.
>>>> Regards,
>>>> Manoj
>>>> Stephen Collyer wrote:
>>>>> Manoj Agrawal wrote:
>>>>>> Hi Stephen,
>>>>>>
>>>>>> Thank you for your response. You are right, The DRDevice is  
>>>>>> included
>>>>>> under #ifdef __ObjC_ preprocessor.
>> That makes it clear (as does the documentation for DRDevice, if  
>> you've read it) that this is an Objective-C/Cocoa class. So if you  
>> want to use it, your source will need to be compiled with the Obj- 
>> C or Obj-C++ compiler. (E.g., give the source file the .mm  
>> extension.) And of course you'll need to use Objective-C to  
>> communicate with the DRDevice instances.
>> I don't know whether that's what you really want to do; there may  
>> be pitfalls involved in mixing Qt and Cocoa, but I expect it can  
>> be done.
>> Alternatively, perhaps you should be looking at Core Foundation- 
>> based options such as DRDeviceRef. (See DRCoreDevice.h.)
>> JK
>> -- 
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx  
>> with "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/



--
 [ signature omitted ] 

Message 11 in thread

On 2008-02-04 07:22:51 -0500, Manoj Agrawal <manoj.a@xxxxxxxxxxx> said:

> Hi Guys,
> 
> I am using Mac's framework named
> "System/Library/Frameworks/DiscRecording.framework" in my qt App. For
> this I added 2 lines in .pro file.
> 
> QMAKE_LFLAGS += -L/System/Library/Frameworks/DiscRecording
> LIBS += -framework DiscRecording
> 
> In one of my header file I included this framework e.g
> #include "DiscRecording/DiscRecording.h" // Including master header file
> for the framework
> 
> but when I try to create object of one of the class on that framework
> "e.g DRDevice obj", I am getting this error:
> "error: 'DRDevice' does not name a type"
> 
> How to remove this error
> 
> Regards,
> Manoj

Not sure if you ever got an answer to this or not but DRDevice is an 
Objective-C class.

The documentation can be found here:

file:///Developer/ADC Reference 
Library/documentation/MusicAudio/Reference/DiscRecordingFrameworkRef/DRDevice/Classes/DRDevice/index.html

You 

don't instantiate a DRDevice directly. You get one by registering with 
the DRNotificationCenter.


Mike

--
 [ signature omitted ]