#pyximport uses parameter language='c++' I have a header.h file like
--- int Test1(int input); extern "C" { _declspec(dllexport) int Test1_C(int input) { return Test1(input); } }
-- The cython pyx code is like: cdef extern from "header.h": cdef int Test1(int input) cdef int Test1_C(int input) --
Now when I am trying to run my Python code I get the
following error message: error LNK2019: unresolved external symbol "int __cdecl Test1(int)" (?Test1@@YAHH@Z) referenced in function Test1_C
These are things that might cause the problem but I could not solve it:
I am not sure if this related to what is mentioned here:
http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html#access-to-c-only-functions
Is it?
The cpp-file states "using namespace std".
Does this mean I have to use
cdef extern from "header.h" namespace "std" ?
I am using pyximport with the following pyxbld file:return Extension(name=modname,
---
def make_ext(modname, pyxfilename):
sources=[pyxfilename],
include_dirs = include_dirs,
library_dirs = library_dirs,
language='c++')
---
Any help is very much appreciated!
Joe