#ifndef __INSECT_H__
#define __INSECT_H__

#ifdef __cplusplus
extern "C" {
#endif /* C++ */

#include "insect/crawler.h"
#include "insect/records.h"

/* basic file API */
#include "insect/file/stat.h"

#ifdef USE_THREADS
#include "insect/concurrent/thread.h"
#endif /* USE_THREADS */

#ifdef __cplusplus
} /* extern "C" */
#endif /* C++ */

#endif /* __INSECT_H__ */

#ifndef __INSECT_H__
#define __INSECT_H__

#include "insect/crawler.h"
#include "insect/records.h"

/* basic file API */
#include "insect/file/stat.h"

#ifdef USE_THREADS
#include "insect/concurrent/thread.h"
#endif /* USE_THREADS */

#endif /* __INSECT_H__ */

--- 
+++ 
@@ -1,5 +1,9 @@
 #ifndef __INSECT_H__
 #define __INSECT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
 
 #include "insect/crawler.h"
 #include "insect/records.h"
@@ -11,4 +15,8 @@
 #include "insect/concurrent/thread.h"
 #endif /* USE_THREADS */
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* C++ */
+
 #endif /* __INSECT_H__ */
Add extern "C" wrapper to main header, for C++
