The C test tool doesn't compile as a plain C program!

develop
Petr Mrázek 2011-04-10 15:36:01 +02:00
parent 1d35044db3
commit 7876a42258
4 changed files with 10 additions and 21 deletions

@ -28,15 +28,16 @@ distribution.
#include "dfhack/DFPragma.h"
namespace DFHack {};
using namespace DFHack;
#include "dfhack/DFExport.h"
#include "dfhack/DFIntegers.h"
typedef void DFHackObject;
#ifdef __cplusplus
namespace DFHack {};
using namespace DFHack;
extern "C" {
#endif
// some global stuff here

@ -256,12 +256,7 @@ DFHACK_EXPORT extern int (*alloc_featuremap_buffer_callback)(c_featuremap_node**
DFHACK_EXPORT void RegisterFeatureMapBufferCallback(int (*funcptr)(c_featuremap_node**, uint32_t*, uint32_t));
#ifdef __cplusplus
}
} // extern "C"
#endif
/*
void BuildDescriptorList(std::vector<t_creaturetype> & src, c_creaturetype_descriptor** dest);
void FreeDescriptorList(c_creaturetype_descriptor* d, uint32_t length);
int CreatureTypeConvert(std::vector<t_creaturetype> &, c_creaturetype**);
*/
#endif

@ -82,6 +82,6 @@ DFHACK_TOOL(dfhellhole hellhole.cpp)
# this needs the C bindings
IF(BUILD_DFHACK_C_BINDINGS)
# for trying out some 'stuff'
DFHACK_TOOL(dftest test.cpp)
# The C bindings won't be real C bindings until this compiles.
#DFHACK_TOOL(dftest test.c)
ENDIF(BUILD_DFHACK_C_BINDINGS)

@ -1,18 +1,11 @@
#include <iostream>
#include <iomanip>
#include <climits>
#include <vector>
#include <sstream>
#include <ctime>
#include <cstdio>
using namespace std;
#include <limits.h>
#include <time.h>
#include <stdio.h>
#include <DFHack.h>
#include <DFHack_C.h>
#include <dfhack-c/DFTypes_C.h>
#include <dfhack-c/DFContext_C.h>
#include <dfhack-c/modules/Maps_C.h>
using namespace DFHack;
int main (int numargs, const char ** args)
{