Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
1 / 1 / 0
Регистрация: 31.01.2020
Сообщений: 148

Ошибки при компиляции программы, задействующей Python

11.12.2020, 18:24. Показов 703. Ответов 0
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
(файлы приложил)
Вот программа:
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include <vector>
#include "matplotlibcpp.h"
 
int main()
{
    double L, R, M, C, U0, B, V0, dt;
 
    L = 0.2;
    R = 2;
    M = 0.5;
    C = 0.5;
    U0 = 100;
    B = 1;
    V0 = 0.01;
    dt = 0.05;
 
    std::vector<double> x, v, a, q, I, Q, t;
 
    x.push_back(0);
    v.push_back(V0);
    q.push_back(U0*C);
    t.push_back(0);
 
    for(auto i = 1; i <= 500; i++)
    {
        t.push_back(t.back() + dt);
        x.push_back(x.back() + v.back()*dt);
        I.push_back(q.back()/C - B*L*v.back());
        q.push_back(q.back() - I.back()*dt);
        a.push_back(I.back()*B*L/M);
        v.push_back(v.back() + a.back()*dt);
    }
 
        matplotlibcpp::figure_size(1200, 780);
 
        matplotlibcpp::plot(t, v);
        matplotlibcpp::named_plot("Название", t, v);
        matplotlibcpp::grid(true);
        matplotlibcpp::xlim(0, 10);
        matplotlibcpp::ylim(0, 50);
        matplotlibcpp::title("Тайтл");
        matplotlibcpp::legend();
 
        matplotlibcpp::save("./Скорость.png");
 
 
    return 0;
}
Компилирую её вот так:

Bash
1
g++ -I/usr/include/python3.8 -lpython3.8 9mes_11.cpp
Выдаёт вот такие undfined referencы:
Bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `_Py_DECREF':
9mes_11.cpp:(.text+0x3e): undefined reference to `_Py_Dealloc'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `_import_array':
9mes_11.cpp:(.text+0x59): undefined reference to `PyImport_ImportModule'
/usr/bin/ld: 9mes_11.cpp:(.text+0x89): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: 9mes_11.cpp:(.text+0xb3): undefined reference to `PyExc_AttributeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0xc2): undefined reference to `PyErr_SetString'
/usr/bin/ld: 9mes_11.cpp:(.text+0xdb): undefined reference to `PyCapsule_Type'
/usr/bin/ld: 9mes_11.cpp:(.text+0xe7): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0xf6): undefined reference to `PyErr_SetString'
/usr/bin/ld: 9mes_11.cpp:(.text+0x129): undefined reference to `PyCapsule_GetPointer'
/usr/bin/ld: 9mes_11.cpp:(.text+0x15b): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0x16a): undefined reference to `PyErr_SetString'
/usr/bin/ld: 9mes_11.cpp:(.text+0x1a1): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0x1bc): undefined reference to `PyErr_Format'
/usr/bin/ld: 9mes_11.cpp:(.text+0x1fd): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0x218): undefined reference to `PyErr_Format'
/usr/bin/ld: 9mes_11.cpp:(.text+0x241): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0x255): undefined reference to `PyErr_Format'
/usr/bin/ld: 9mes_11.cpp:(.text+0x269): undefined reference to `PyExc_RuntimeError'
/usr/bin/ld: 9mes_11.cpp:(.text+0x27d): undefined reference to `PyErr_Format'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::detail::_interpreter::safe_import(_object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreter11safe_importEP7_objectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp6detail12_interpreter11safe_importEP7_objectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x4a): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreter11safe_importEP7_objectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp6detail12_interpreter11safe_importEP7_objectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xfe): undefined reference to `PyFunction_Type'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::detail::_interpreter::import_numpy()':
9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreter12import_numpyEv[_ZN13matplotlibcpp6detail12_interpreter12import_numpyEv]+0x1d): undefined reference to `PyErr_Print'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreter12import_numpyEv[_ZN13matplotlibcpp6detail12_interpreter12import_numpyEv]+0x24): undefined reference to `PyExc_ImportError'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreter12import_numpyEv[_ZN13matplotlibcpp6detail12_interpreter12import_numpyEv]+0x33): undefined reference to `PyErr_SetString'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::detail::_interpreter::_interpreter()':
9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x6f): undefined reference to `Py_SetProgramName'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x74): undefined reference to `Py_Initialize'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xb3): undefined reference to `PySys_SetArgv'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xce): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xe1): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xf4): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x107): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x17a): undefined reference to `PyImport_Import'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x1ab): undefined reference to `PyErr_Print'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x227): undefined reference to `PyObject_CallMethod'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x236): undefined reference to `PyImport_Import'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2a0): undefined reference to `PyImport_Import'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x320): undefined reference to `PyImport_Import'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x1809): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x18f9): undefined reference to `PyTuple_New'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::detail::_interpreter::~_interpreter()':
9mes_11.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterD2Ev[_ZN13matplotlibcpp6detail12_interpreterD5Ev]+0x11): undefined reference to `Py_Finalize'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::figure_size(unsigned long, unsigned long)':
9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0x2a): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0x64): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0x78): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0xae): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0xc2): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0xc7): undefined reference to `PyDict_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0xe2): undefined reference to `PyDict_SetItemString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0xec): undefined reference to `PyLong_FromSize_t'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0x102): undefined reference to `PyDict_SetItemString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp11figure_sizeEmm[_ZN13matplotlibcpp11figure_sizeEmm]+0x126): undefined reference to `PyObject_Call'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::legend()':
9mes_11.cpp:(.text._ZN13matplotlibcpp6legendEv[_ZN13matplotlibcpp6legendEv]+0x33): undefined reference to `PyObject_CallObject'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::title(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0x3b): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0x49): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0x62): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0x67): undefined reference to `PyDict_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0xc2): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0xee): undefined reference to `PyDict_SetItemString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE]+0x11e): undefined reference to `PyObject_Call'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::grid(bool)':
9mes_11.cpp:(.text._ZN13matplotlibcpp4gridEb[_ZN13matplotlibcpp4gridEb]+0x22): undefined reference to `_Py_TrueStruct'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4gridEb[_ZN13matplotlibcpp4gridEb]+0x2b): undefined reference to `_Py_FalseStruct'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4gridEb[_ZN13matplotlibcpp4gridEb]+0x45): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4gridEb[_ZN13matplotlibcpp4gridEb]+0x5e): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4gridEb[_ZN13matplotlibcpp4gridEb]+0x79): undefined reference to `PyObject_CallObject'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `matplotlibcpp::save(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
9mes_11.cpp:(.text._ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x28): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x36): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x4f): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x67): undefined reference to `PyObject_CallObject'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `bool matplotlibcpp::plot<double, double>(std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x8d): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x9b): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xb4): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xc9): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xde): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIddEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xf6): undefined reference to `PyObject_CallObject'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `bool matplotlibcpp::named_plot<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0x22): undefined reference to `PyDict_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0x3a): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0x50): undefined reference to `PyDict_SetItemString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0x84): undefined reference to `PyUnicode_FromString'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0x92): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0xab): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0xc0): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0xd5): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_[_ZN13matplotlibcpp10named_plotIdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIT_SaISA_EESE_S8_]+0xf1): undefined reference to `PyObject_Call'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `void matplotlibcpp::xlim<int>(int, int)':
9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x20): undefined reference to `PyList_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x2e): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x42): undefined reference to `PyList_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x4c): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x60): undefined reference to `PyList_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x6a): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x83): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4xlimIiEEvT_S1_[_ZN13matplotlibcpp4xlimIiEEvT_S1_]+0x9e): undefined reference to `PyObject_CallObject'
/usr/bin/ld: /tmp/ccJMbAhi.o: in function `void matplotlibcpp::ylim<int>(int, int)':
9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x20): undefined reference to `PyList_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x2e): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x42): undefined reference to `PyList_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x4c): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x60): undefined reference to `PyList_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x6a): undefined reference to `PyTuple_New'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x83): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: 9mes_11.cpp:(.text._ZN13matplotlibcpp4ylimIiEEvT_S1_[_ZN13matplotlibcpp4ylimIiEEvT_S1_]+0x9e): undefined reference to `PyObject_CallObject'
collect2: error: ld returned 1 exit status
Даже не знаю, что делать, недели две назад никаких ошибок не было. Пожалуйста, помогите.
Вложения
Тип файла: zip files.zip (14.5 Кб, 2 просмотров)
0
IT_Exp
Эксперт
34794 / 4073 / 2104
Регистрация: 17.06.2006
Сообщений: 32,602
Блог
11.12.2020, 18:24
Ответы с готовыми решениями:

ошибки при компиляции программы С++
Подскажите где я совершил ошибки. Вот задача:Составить класс файл. Класс должен обладать следующими свойствами:путь к файлу, имя файла,...

Ошибки при компиляции программы c++
Здравствуйте, написал программу по заданию (скриншот) я написал код main.cpp #include &lt;iostream&gt; #include &quot;Line.h&quot; ...

Ошибки при компиляции программы
#include &quot;StdAfx.h&quot; #include &quot;math.h&quot; #include &lt;stdio.h&gt; #include &lt;iostream&gt; using namespace std; int main () { ...

0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
BasicMan
Эксперт
29316 / 5623 / 2384
Регистрация: 17.02.2009
Сообщений: 30,364
Блог
11.12.2020, 18:24
Помогаю со студенческими работами здесь

Ошибки при компиляции программы c++
Здравствуйте, написал программу по заданию Составить программу, которая содержит текущую информацию о книгах в библиотеке. Сведения о...

Синтаксические ошибки при компиляции программы
Доброго времени суток ребят, у меня к вам просьба, посмотреть в чем проблема. #include&lt;iostream&gt; using namespace std; int...

При компиляции программы возникли ошибки
Здравствуйте. Есть программа для работы с указателями и не хочет собираться, вот привожу исходный код: #include &lt;iostream&gt; ...

При компиляции простой программы - ошибки
Работаю в простой IDE. Занимаюсь по учебникам и по видео на ютубе, при компиляции кода появляются ошибки (покажу на скриншоте) Причем я...

Синтаксические ошибки при компиляции программы на структуру
#include &lt;iostream&gt; #include &lt;string.h&gt; #define n 4; using namespace std; struct OIL{ char marka; int litri; int cena; ...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
1
Ответ Создать тему
Новые блоги и статьи
Уведомление о неверно выбранном значении справочника
Maks 06.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "НарядПутевка", разработанного в конфигурации КА2. Задача: уведомлять пользователя, если в документе выбран неверный склад. . .
Установка Qt Creator для C и C++: ставим среду, CMake и MinGW без фреймворка Qt
8Observer8 05.04.2026
Среду разработки Qt Creator можно установить без фреймворка Qt. Есть отдельный репозиторий для этой среды: https:/ / github. com/ qt-creator/ qt-creator, где можно скачать установщик, на вкладке Releases:. . .
AkelPad-скрипты, структуры, и немного лирики..
testuser2 05.04.2026
Такая программа, как AkelPad существует уже давно, и также давно существуют скрипты под нее. Тем не менее, прога живет, периодически что-то не спеша дополняется, улучшается. Что меня в первую очередь. . .
Отображение реквизитов в документе по условию и контроль их заполнения
Maks 04.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "ПланированиеСпецтехники", разработанного в конфигурации КА2. Данный документ берёт данные из другого нетипового документа. . .
Фото всей Земли с борта корабля Orion миссии Artemis II
kumehtar 04.04.2026
Это первое подобное фото сделанное человеком за 50 лет. Снимок называют новым вариантом легендарной фотографии «The Blue Marble» 1972 года, сделанной с борта корабля «Аполлон-17». Новое фото. . .
Вывод диалогового окна перед закрытием, если документ не проведён
Maks 04.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "СписаниеМатериалов", разработанного в конфигурации КА2. Задача: реализовать программный контроль на предмет проведения документа. . .
Программный контроль заполнения реквизитов табличной части документа
Maks 02.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "СписаниеМатериалов", разработанного в конфигурации КА2. Задача: 1. Реализовать контроль заполнения реквизита. . .
wmic не является внутренней или внешней командой
Maks 02.04.2026
Решение: DISM / Online / Add-Capability / CapabilityName:WMIC~~~~ Отсюда: https:/ / winitpro. ru/ index. php/ 2025/ 02/ 14/ komanda-wmic-ne-naydena/
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru