matplotlib-cpp icon indicating copy to clipboard operation
matplotlib-cpp copied to clipboard

Cannot compile with makefile

Open nkapania opened this issue 7 years ago • 2 comments

Hello,

Matplotlib-cpp works great when I compile directly with g++ at the command line, but running "make" with a makefile I get the following errors when trying to import. Makefile attached by the way.

Any insights? Nitin Makefile.tar.gz

g++ -o main obj/mapmatch.o obj/load_vehicle.o obj/tiremodels.o obj/utils.o obj/simulation.o obj/world.o obj/speed_profiles.o obj/main.o obj/controllers.o obj/main.o: In function _import_array': main.cpp:(.text+0xe): undefined reference to PyImport_ImportModule' main.cpp:(.text+0x28): undefined reference to PyExc_ImportError' main.cpp:(.text+0x35): undefined reference to PyErr_SetString' main.cpp:(.text+0x50): undefined reference to PyObject_GetAttrString' main.cpp:(.text+0x9a): undefined reference to PyExc_AttributeError' main.cpp:(.text+0xa7): undefined reference to PyErr_SetString' main.cpp:(.text+0xbf): undefined reference to PyCObject_Type' main.cpp:(.text+0xc8): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0xd5): undefined reference to PyErr_SetString' main.cpp:(.text+0x123): undefined reference to PyCObject_AsVoidPtr' main.cpp:(.text+0x175): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0x182): undefined reference to PyErr_SetString' main.cpp:(.text+0x1b9): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0x1d2): undefined reference to PyErr_Format' main.cpp:(.text+0x213): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0x22c): undefined reference to PyErr_Format' main.cpp:(.text+0x255): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0x267): undefined reference to PyErr_Format' main.cpp:(.text+0x27b): undefined reference to PyExc_RuntimeError' main.cpp:(.text+0x28d): undefined reference to `PyErr_Format' collect2: error: ld returned 1 exit status Makefile:14: recipe for target 'main' failed make: *** [main] Error 1

nkapania avatar Dec 30 '18 15:12 nkapania

Do you fixed the problem?

whitesnowbird avatar Jun 05 '21 12:06 whitesnowbird

The same err, How to fix it?

xueao avatar Jan 04 '22 03:01 xueao