Solved: it helps if you compile for the x64 platform (the example solution only contains win32 configurations and I think this choice not only affects the generated code but also the name mangling used to generate decorated names in the .dll, hence the linker errors)
I should’ve looked better :-/ BTW: the /export:initexample switch is wrong: there is no need to explicitly export anything (the PyMODINIT_FUNC macro takes care of that) and although the python docs state otherwise, the module initialization function should be called PyInit_xxxxxx (as it is in the ectuall example code) and NOT initxxxxxxx (as stated in the accompanying text). Cheers, -- Michel. From: [email protected] [mailto:[email protected]] On Behalf Of Michel Anders Sent: zaterdag 12 april 2014 20:28 To: 'Blender Foundation Python list' Subject: [Bf-python] compile a native c extension for python with msvc 2013 Hi, Did anyone have any luck in compiling the example_nt extension from the python source distribution w. msvc 2013? I copied it into lib\win64_vc12\python, opened the solution in msvc 2013 and after pointing the include directories and library directories o the ones in the same python lib it compiles ok but complains about not being able to find initexample although there is an /export:initexample defined in the properties. Anyone have a clue? Cheers, -- Michel. 1>------ Build started: Project: example, Configuration: Debug Win32 ------ 1> example.c 1>e:\blender source environment\lib\win64_vc12\python\include\python3.3\pymath.h(22): warning C4273: 'round' : inconsistent dll linkage 1> e:\visual studio 2013\vc\include\math.h(516) : see previous definition of 'round' 1>example.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification 1>LINK : error LNK2001: unresolved external symbol initexample 1>.\Debug/example_d.lib : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
_______________________________________________ Bf-python mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-python
