Hello All,
I was trying to make dll to play with ctypes in python. I'm not good at C++ and I studied it lightly looong ago and only familiar with very simple thing. After search the net I found smo instructions but when I try to Build (with CodeBlocks), I get error:
C++ examples\dlltest.cpp|5|error C2447: '{' : missing function header (old-style formal list?)|
||=== Build finished: 1 errors, 0 warnings ===|
I don't know what is wrong :(
I want simple DLL that have two functions, one for adding numbers, and another for multiplying numbers. But I cannot get even the first function alone to work
Thanks for your help
dlltest.cpp
// dlltest.cpp
#define DLLEXPORT extern "C" _declspec(dllexport)
DLLEXPORT int sum(int a, int b);
{return c = a+b;}
dlltest.h
// dlltest.h
int sum(int, int);