[Clamav-devel] Use ClamAV library/functions in C++

Nibin V M nibinvm at gmail.com
Sun Dec 14 10:51:14 EST 2014


Hello Kevin,

I get the following error while compiling my program.

============
n file included from techsguardware.c:4:
libclamav/str.h:37: error: expected declaration specifiers or ‘...’ before
‘uint16_t’
libclamav/str.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
techsguardware.c:13:27: error: clamav-config.h: No such file or directory
===========

Here are my includes.

===========
#include "libclamav/str.h"
#include "libclamav/clamav.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
=============

What I trying to do is, to load selected + custom DBs and scan a file.
Please would you help me to find what is wrong in my code?



On Sat, Dec 13, 2014 at 3:44 PM, Nibin V M <nibinvm at gmail.com> wrote:
>
> Thank you for the quick response Kevin :) I will read the mentioned docs.
>
> On Fri, Dec 12, 2014 at 10:09 PM, Kevin Lin <klin at sourcefire.com> wrote:
>>
>> The best place to find the documentation to using the ClamAV API functions
>> can be found in the source distribution's docs directory in the
>> clamdoc.pdf. In the 0.98.5 source, the documentation for libclamav
>> (section
>> 6) starts on page 22 with the API details (section 6.3) starting on page
>> 26. Additionally, the documentation is available in html format in the
>> docs/html directory of the source distribution.
>>
>> Another thing that could be useful would be to examine existing
>> applications that integrate ClamAV. In particular, you could look at how
>> clamscan was implemented within the source file clamscan/manager.c.
>>
>> Finally, don't forget to include the clamav.h header file [#include <
>> clamav.net>] in your source. All the function of the public API can be
>> found in clamav.h.
>>
>> If you have any particular questions, free free to ask and I'll see if I
>> can find someone to answer your questions.
>>
>> -Kevin
>>
>> On Fri, Dec 12, 2014 at 11:09 AM, Nibin V M <nibinvm at gmail.com> wrote:
>>
>> > Hello,
>> >
>> > I have been trying to find  a good documentation to use ClamAV
>> >  library/functions in my C++ program; unfortunately it is not working.
>> Can
>> > someone point me to a documentation using which I can achieve it? Or
>> > someone here can give me a  quick walk through?
>> >
>> > Thanks in advance.
>> >
>> >
>> > --
>> > Regards....
>> >
>> > Nibin.
>> >
>> > http://TechsWare.in
>> > _______________________________________________
>> > http://lurker.clamav.net/list/clamav-devel.html
>> > Please submit your patches to our Bugzilla: http://bugs.clamav.net
>> >
>> > http://www.clamav.net/contact.html#ml
>> >
>> _______________________________________________
>> http://lurker.clamav.net/list/clamav-devel.html
>> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>>
>> http://www.clamav.net/contact.html#ml
>>
>
>
> --
> Regards....
>
> Nibin.
>
> http://TechsWare.in
>


-- 
Regards....

Nibin.

http://TechsWare.in


More information about the clamav-devel mailing list