Using the slackpack for liberror.h available on linuxpackages.net I get very verbose error output when trying to compile very simple use of the fundamentals of the library.
I've been doing
Code:
gcc err.c -o err -lerror
The file err.c is as follows:
Code:
#include <liberror.h>
int main (int argc, char **argv)
{
err_init(&argc, &argv);
err_add_stream (C_TAG_ALL, stdout, NULL);
eprintf(C_TAG_BANNER, 0, "This is a test to see if I can compile");
}
I get HUGE output of:
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(err_map_char_p_char_p.o)(.text+0x600e): In function `err_map_char_p_char_p_remove_internal(err_map_char_p_char_p_t*, char*, char**)':
src/err_map_char_p_char_p.cpp:4226: undefined reference to `operator delete(void*)'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(err_map_char_p_char_p.o)(.text+0x1d75): In function `err_map_char_p_char_p_free_sorted_iterator':
src/err_map_char_p_char_p.cpp:6128: undefined reference to `operator delete[](void*)'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(err_map_char_p_char_p.o)(.text+0x1d95): In function `err_map_char_p_char_p_free_sorted_iterator_ptr':
src/err_map_char_p_char_p.cpp:6134: undefined reference to `operator delete[](void*)'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(err_map_char_p_char_p.o)(.text+0x595a): In function `err_map_char_p_char_p_destroy_internal(err_map_char_p_char_p_t*)':
src/err_map_char_p_char_p.cpp:4549: undefined reference to `operator delete(void*)'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(err_map_char_p_char_p.o)(.text+0x5a81): In function `err_map_char_p_char_p_destroy_internal_flags(err_map_char_p_char_p_t*, unsigned char, unsigned char)':
src/err_map_char_p_char_p.cpp:4568: undefined reference to `operator delete(void*)'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(style-qt.o)(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../liberror.a(style-qt3.o)(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
and with much more than my terminal can scroll up aswell.
Is this an error in how liberror.h was compiled or have I got linking done incorrectly? It's my first time linking.
edit: I've tried compiling liberror on my own in Slack 10.1 and I get errors but the tgz is from a reputable packager and seems to work otherwise. ie the binaries it installs are fully functional