Archived Forum Post

Index of archived forum posts

Question:

Compilation failed: not able to use class CkByteData and its methods

Dec 07 '15 at 09:11

Hi All, Downloaded the latest library “chilkat-9.5.0-armv6-linux.tar.gz” 30 days trial version. I am trying to use class CkByteData and its methods getData and getSize.

Coded it like: CkByteData *binaryData = NULL; binaryData->preAllocate(200000);

But got errors: Invalid use of incomplete type class CkByteData binaryData->preAllocate(20000); In file included from client.cpp:10:0: /include/CkMime.h:17:7: error: forward declared of class CkByteData

Will you please guide me how to use the object? Appreciates help.

Thanks, Prashant


Accepted Answer

The .h header for a Chilkat class must be included if that class is used.

Add this at the top of your source file:

#include "CkByteData.h"