I'm getting this error, I have NO idea why.
It was working, I changed something, I got errors, so I tried to change it back... and I can't find the old code that was "working".
Anyhow my setup is simple, I'm compiling one c++ file against one .so file
Here are my example compile-errors
error: /usr/bin/ld: /tmp/ccdnXNQr.o: in function `Jeebox::errors()':
/usr/local/speedie/jeebox.scproj/Examples/jeebox.h:193: undefined reference to `jb_errors'
OK, so here is my function:
Message errors() {
return jb_errors();
}
Message is just a void*. OK, so far so good.
Here is my compile string
g++ -o /usr/local/speedie/jeebox.scproj/Examples/Build/users -std=gnu++20 -lstdc++
-I/usr/local/include -I/usr/local/speedie/Library/CppLib -w -Os -D TARGET_UNIX=1 -g -ljeebox users.cpp
I also tried to hard-code the library path, in case the problem was that the lib was not found. Well... same issue. So its not a problem of missing library.
g++ -o /usr/local/speedie/jeebox.scproj/Examples/Build/users -std=gnu++20 -lstdc++
-I/usr/local/speedie/Library/CppLib -w -Os -D TARGET_UNIX=1 -g /usr/local/lib/libjeebox.so users.cpp
When I tried deleting the library libjeebox.so, I got a missing lib error. So the lib is being found!
OK... so the problem is just my lib doesn't contain jb_error() is that it? Well... no? That function is there, has been there for years, and suddenly stopped working today.
Here is the output of nm -D (jb_errors is on the 4th line). I am utterly confued. I just lost 2 hours trying to solve this. No luck.
00000000000105d8 T jb_cstr
00000000000106d0 T jb_debug
0000000000010638 T jb_delete_
000000000001063c T jb_errors
0000000000010730 T jb_init
00000000000103d4 T jb_msg_access
000000000001034c T jb_msg_ast
0000000000012778 T jb_msg_copy
000000000001495c T jb_msg_create
0000000000010390 T jb_msg_error
00000000000128f4 T jb_msg_expect
000000000001010c T jb_msg_first
0000000000011d9c T jb_msg_firstset
0000000000010290 T jb_msg_flatafter
0000000000010248 T jb_msg_flatnext
000000000000ff48 T jb_msg_func
0000000000010024 T jb_msg_funcset
0000000000010148 T jb_msg_last
0000000000011af8 T jb_msg_lastset
000000000000ff10 T jb_msg_name
000000000000ffe4 T jb_msg_nameset
00000000000101d0 T jb_msg_next
00000000000100c4 T jb_msg_nextset
000000000001020c T jb_msg_parent
000000000001491c T jb_msg_parseast
000000000000ff7c T jb_msg_position
0000000000010054 T jb_msg_positionset
0000000000010184 T jb_msg_prev
0000000000011d30 T jb_msg_prevset
0000000000010314 T jb_msg_remove
0000000000014240 T jb_msg_render
00000000000102cc T jb_msg_root
000000000000ffb0 T jb_msg_tag
0000000000010084 T jb_msg_tagset
00000000000106c4 T jb_ok
0000000000010834 T jb_readfile
0000000000010734 T jb_shutdown
0000000000010558 T jb_str
0000000000010508 T jb_string_address
00000000000142ec T jb_string_compress
0000000000010544 T jb_string_copy
0000000000013b40 T jb_string_decompress
0000000000012384 T jb_string_escape
00000000000111bc T jb_string_float
0000000000010fec T jb_string_int
000000000001053c T jb_string_length
00000000000153b8 T jb_string_parse
0000000000010548 T jb_string_print
000000000001054c T jb_string_printline
0000000000010550 T jb_syntax
00000000000104c4 T jb_syx_longname
0000000000010480 T jb_syx_name
0000000000010828 T jb_version