Vavel wrote:
> Knut Stolze wrote:
>
>> You are probably aware of this, but everything following the "EXEC SQL"
>> keywords is not valid C or C++ code. So the compiler should actually
>> raise
>> some syntax errors. You need to precompile the code to translate the
>> "EXEC
>> SQL" things into real C function calls. Have a look at the db2
>> precompiler
>>
(
http://publib.boulder.ibm.com/infoce...e/r0001964.htm)
>> for that.
>>
>> Once you compiled the code you can link it into a library or executable.
>> In this step, you need to link in the library libdb2.a (exact name and
>> extension depends on you platform). Additionally, you might need
>> libdb2api
>> and/or libdb2apie. I don't recall if you need an additional library for
>> the AIV Extender, but I don't think so.
>
> Hi
> You gave me strongly useful informations. I've read about precompiler
> already.Thank you!
> I've already added to my database audio and image data (as yet only
> manually, because I have got one error:
>
> C:\PROGRA~1\IBM\DMB\include\dmbsystm.h:280: #error "DMB: Unsupported
> Operating System"
> (dmbaudio.h, dmbvideo.h and dmbimage.h call to dmbbase.h and this
> library calls to dmbsystm.h)
A *.h file is a header file that just contains some declarations of
functions that are provided by some library - it is not the library itself.
Please don't mix those two different things.
> dmbsystm.h:
> /* dmbsystm.h */
> /* This header file is included at the beginning of all DMB header
> files to define the portibility linkage/export macros for the header
> file prototypes. */
> ...
> /************************************************** ****************************/
> /* Macros based on a specific operating system. */
> /************************************************** ****************************/
> /*-----------------------------------------------------------------AIX--------*/
> #if defined(DMB_UNIX)
> #define DMB_PATH_SEP '/'
> #define MaxPathName 1000
> /*-----------------------------------------------------------------OS/2-------*/
> #elif defined(DMB_OS2)
> #define DMB_PATH_SEP '\\'
> #define MaxPathName 260
> /*---------------------------------------------------------------Windows
> 3.1--*/
> #elif defined(DMB_WINDOWS)
> #define DMB_PATH_SEP '\\'
> #define MaxPathName 1000
> /*-----------------------------------------------------------------MacOs------*/
> #elif defined(DMB_MAC)
>
> #define DMB_PATH_SEP ':'
> #define MaxPathName 1000
>
> /*-----------------------------------------------------------------Unknown----*/
> #else
> #ifndef __MWERKS__
> /* !!!!!!!!!!!!! line 280: */
> #error "DMB: Unsupported Operating System"
> #endif
> #endif
> /* EOF */
>
> My OS is Win XP Service Pack 2
> IBM DB2 UDB v8.1.3 Personnal Edition for Win
>
> May I manually set DMB_WINDOWS?
That's one option. However, I think you did not include the DB2 header
files, specifically sqlsystm.h, before you included the dmb*.h header file
(dmbimage.h, I guess). So I'd recommend this:
#include "sql.h"
#include "dmbimage.h"
--
Knut Stolze
Information Integration
IBM Germany / University of Jena