Problem to get start with QuickTime SDK in C++ application.

Hi,
Im new to QuickTime.Now i need to use quicktime7.1 SDK functionalities in my plain C++ application.Hence I started with a plain C++ application just to check whether i can access the quick time functions there.Im currently using Dev-cpp IDE for developing my application.

Given the sample code.

#include
#include
#include
using namespace std;

main()
{
int ver=0;
ver=quicktime_major(void);
cout<<"VERSION"<
getch();
}

The given program uses the quicktime function quicktime__major to get the version information.The function returns an integer value,which is the version of the quicktime installed.The function is declared with in the header quicktime.h.Hence i added the header file.

On Compiling,I am getting some errors in the main function as listed :-

main.cpp: In function `int main()':
main.cpp:9: error: expected primary-expression before "void"
main.cpp:9: error: `quicktime_major' undeclared (first use this function)
main.cpp:9: error: (Each undeclared identifier is reported only once for each function it appears in.)make.exe: *** [main.o]

Error 1Execution terminated


----------------------------------------------------------------------------------------------------------------------------
I am getting so many other errors in the quicktime header files which i am not able to get resolved.Some sample errors are

listed below.
----------------------------------------------------------------------------------------------------------------------------
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:145: error: conflicting declaration 'kATSULineWidthTag'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:145: error: 'kATSULineWidthTag' has a previous declaration as

` kATSULineWidthTag'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:145: error: declaration of `kATSULineWidthTag'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:145: error: conflicts with previous declaration `

kATSULineWidthTag'


[this same error is repeating for all the enum members in the header file ATSUnicode.h ]



C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h: In function `OSStatus (* NewATSQuadraticLineUPP(OSStatus (*)(const

Float32Point*, const Float32Point*, void*)))(const Float32Point*, const Float32Point*, void*)':
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2523: error: redefinition of `OSStatus (*

NewATSQuadraticLineUPP(OSStatus (*)(const Float32Point*, const Float32Point*, void*)))(const Float32Point*, const

Float32Point*, void*)'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2523: error: `OSStatus (* NewATSQuadraticLineUPP(OSStatus (*)(const

Float32Point*, const Float32Point*, void*)))(const Float32Point*, const Float32Point*, void*)' previously defined here

C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h: In function `OSStatus (* NewATSQuadraticCurveUPP(OSStatus (*)(const

Float32Point*, const Float32Point*, const Float32Point*, void*)))(const Float32Point*, const Float32Point*, const

Float32Point*, void*)':
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2542: error: redefinition of `OSStatus (*

NewATSQuadraticCurveUPP(OSStatus (*)(const Float32Point*, const Float32Point*, const Float32Point*, void*)))(const

Float32Point*, const Float32Point*, const Float32Point*, void*)'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2542: error: `OSStatus (* NewATSQuadraticCurveUPP(OSStatus (*)(const

Float32Point*, const Float32Point*, const Float32Point*, void*)))(const Float32Point*, const Float32Point*, const

Float32Point*, void*)' previously defined here

C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2561: error: redefinition of `OSStatus (*

NewATSQuadraticNewPathUPP(OSStatus (*)(void*)))(void*)'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2561: error: `OSStatus (* NewATSQuadraticNewPathUPP(OSStatus

(*)(void*)))(void*)' previously defined here
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h: At global scope:C:/Program Files/QuickTime

SDK/CIncludes/ATSUnicode.h:2578: error: conflicting declaration 'uppATSQuadraticClosePathProcInfo'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2578: error: 'uppATSQuadraticClosePathProcInfo' has a previous

declaration as ` uppATSQuadraticClosePathProcInfo'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2578: error: declaration of `uppATSQuadraticClosePathProcInfo'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2578: error: conflicts with previous declaration `

uppATSQuadraticClosePathProcInfo'
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h: In function `OSStatus (* NewATSQuadraticClosePathUPP(OSStatus

(*)(void*)))(void*)':
C:/Program Files/QuickTime SDK/CIncludes/ATSUnicode.h:2580: error: redefinition of `OSStatus (*

NewATSQuadraticClosePathUPP(OSStatus (*)(void*)))(void*)'

Can anyone help me to resolve the above issues.

Thanks in advance,
Sans
  • start over.

    trying to make calls to Carbon from Windows isn't pretty. so you're not gonna want to include QuickTime.h

    instead you need to:

    link in QTMLClient.lib
    inlcude QTML.h

    include only the headers you actually need to use (movies.h, Quickdraw.h, QuickTimeVR.h, etc...)


    [quote=sansc]ver=quicktime_major(void);
    ok... i'm not sure i've ever heard of quicktime_major()... but since you're trying to pass it a void, i'm gonna make a strong suggestion: consider downloading (the free) Microsoft Visual Basic 2005 Express Edition and use it to program against the QuickTime COM objects.

    but if you really need to hit the API directly, here's how to snag a version:[code]
    int main( )

    {[INDENT]cout <"Initializing QuickTime...";[INDENT]InitializeQTML(0); cout <
    [/INDENT]<< "QuickTime Initialized."/*...probably...*/ <


    long version;
    Gestalt(gestaltQuickTime,&version);



    cout <<<< "\tQuickTime Version: ";[INDENT]cout.setf(ios::hex,ios_base::basefield);
    cout <<<


    [/INDENT]_getch();
    return 0;

    [/INDENT]}[/code]