Glibc calls opem/close/read/write/lseek


#1

i’m getting linker errors on those symbols, i use a library that uses those calls directly, what framework/lib do i need to add to my project or what #define should i use to get those symbols. i’ve been trying the obious choices:
libc
libSystem
System.framework

gogole is not very helpful.


#2

I’ve always assumed they were in libc (?)


#3

well me too, i don’t know what’s wrong, all symbols are ok (i use juce in that project, i use CURL and some other stuff), however i get missing symbols for: __open __write __close __lseek (two underscores).


#4

I use curl in my application too. Haven’t had to face this problem. These are the standard frameworks I have included in my project.

-framework Quicktime
-framework AGL
-framework Security
-framework OpenGl
-framework Carbon
-framework Foundation
-framework AppKit


#5

the curl symbols look ok, however there is something i use called “libgadu” (it’s a library for interfacing with a polish IM called gadugadu), anyway i get erros from it’s function calls like so:

"non-virtual thunk to juce::Button::getTooltip()", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
  "__write", referenced from:
      _gg_dcc_watch_fd in dcc.o
      _gg_dcc7_watch_fd in dcc7.o
  "__open", referenced from:
      _gg_dcc_fill_file_info2 in dcc.o
      _gg_dcc7_send_file in dcc7.o
  "__read", referenced from:
      _gg_dcc_watch_fd in dcc.o
      _gg_dcc7_watch_fd in dcc7.o
      _gg_file_hash_sha1 in sha1.o
      _gg_file_hash_sha1 in sha1.o
  "non-virtual thunk to juce::Button::applicationCommandInvoked(juce::ApplicationCommandTarget::InvocationInfo const&)", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
  "non-virtual thunk to juce::Button::keyStateChanged(bool, juce::Component*)", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
  "non-virtual thunk to juce::Button::keyPressed(juce::KeyPress const&, juce::Component*)", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
  "__close", referenced from:
      _gg_dcc7_send_file in dcc7.o
      _gg_dcc7_free in dcc7.o
      _gg_resolve in libgadu.o
      _gg_resolve in libgadu.o
      _gg_resolve in libgadu.o
      _gg_resolve in libgadu.o
  "non-virtual thunk to juce::ThreadWithProgressWindow::timerCallback()", referenced from:
      vtable for EdoDownloadUpdatein EdoUpdate.o
  "non-virtual thunk to juce::Button::setTooltip(juce::String const&)", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
  "__lseek", referenced from:
      _gg_dcc_watch_fd in dcc.o
      _gg_dcc7_watch_fd in dcc7.o
      _gg_file_hash_sha1 in sha1.o
      _gg_file_hash_sha1 in sha1.o
      _gg_file_hash_sha1 in sha1.o
      _gg_file_hash_sha1 in sha1.o
      _gg_file_hash_sha1 in sha1.o
  "non-virtual thunk to juce::Button::applicationCommandListChanged()", referenced from:
      vtable for EdoTabsBarButtonin EdoTabsBarButton.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

#6

i corrected the IO calls errors (the library had the windows naming scheme for it’s IO calls like _open _close, i changed it to open close)

i don’t however understand the non-virtual thunk errors, does this mean i need to define those calls in my subclasses? i don’t get those errors on linux or windows so i don’t get what’s wrong.

the EdoTabsBarButton class is a subclass of TabBarButton, and the EdoUpdateDownload is a subclass of ThreadWithProgressWindow.


#7

errors went away with the new juce svn tip.

i love it when problems solve themself.


#8

Strange - don’t think I touched anything that would make a difference to this. Maybe you just needed a really good clean rebuild…


#9

maybe it’s the first time i’m building this app on a mac, but it’s all good now.