Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC-4.8.4编译出现undefined reference to `operator delete(void*, unsigned long)' #24

Closed
wmatrix opened this issue Feb 15, 2019 · 1 comment

Comments

@wmatrix
Copy link

wmatrix commented Feb 15, 2019

HostMonitor示例在Ubuntu18.04和Ubuntu16.04(GCC-5.4.0)上编译OK,但是在Ubuntu 14.04(GCC-4.8.4)上编译出现链接失败错误:

[100%] Linking CXX executable HostMonitor
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(button.cpp.o): In function `c_button::clone()':
button.cpp:(.text._ZN8c_button5cloneEv[_ZN8c_button5cloneEv]+0x4b): undefined reference to `operator delete(void*, unsigned long)'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(edit.cpp.o): In function `c_edit::clone()':
edit.cpp:(.text._ZN6c_edit5cloneEv[_ZN6c_edit5cloneEv]+0x4b): undefined reference to `operator delete(void*, unsigned long)'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(edit.cpp.o): In function `c_keyboard::~c_keyboard()':
edit.cpp:(.text._ZN10c_keyboardD0Ev[_ZN10c_keyboardD5Ev]+0x25): undefined reference to `operator delete(void*, unsigned long)'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(keyboard.cpp.o): In function `c_keyboard::clone()':
keyboard.cpp:(.text._ZN10c_keyboard5cloneEv[_ZN10c_keyboard5cloneEv]+0x4b): undefined reference to `operator delete(void*, unsigned long)'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(keyboard.cpp.o): In function `c_keyboard_button::clone()':
keyboard.cpp:(.text._ZN17c_keyboard_button5cloneEv[_ZN17c_keyboard_button5cloneEv]+0x4b): undefined reference to `operator delete(void*, unsigned long)'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libgui.a(keyboard.cpp.o):keyboard.cpp:(.text._ZN17c_keyboard_buttonD0Ev[_ZN17c_keyboard_buttonD5Ev]+0x25): more undefined references to `operator delete(void*, unsigned long)' follow
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libcore.a(display.cpp.o): In function `c_display::snap_shot(char const*)':
display.cpp:(.text+0x9b4): undefined reference to `__cxa_throw_bad_array_new_length'
~/GuiLiteSamples/HostMonitor/BuildLinux/libs/libcore.a(wave_ctrl.cpp.o): In function `c_wave_ctrl::clone()':
wave_ctrl.cpp:(.text._ZN11c_wave_ctrl5cloneEv[_ZN11c_wave_ctrl5cloneEv]+0x35): undefined reference to `operator delete(void*, unsigned long)'
collect2: error: ld returned 1 exit status
make[2]: *** [BuildLinux/HostMonitor] Error 1
make[1]: *** [BuildLinux/CMakeFiles/HostMonitor.dir/all] Error 2
make: *** [all] Error 2
@idea4good
Copy link
Owner

请用同样的GCC工具编译一下GuiLite的库(core,gui),并替换到HostMonitor/BuildLinux/libs下面;该问题在readme文档中也有描述,请按照文档的指引解决该问题

@wmatrix wmatrix closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants