Hi,

I'm trying to port a linux application to mac with Qt... And I've read in some forums that libnsl isn't supported on Mac, that it's included on libc. But I've tried to just erase the link -lnsl, and adding -lc, but it always stops at the same compilation line returning lots of undefined symbols but ending with the same single error: collect2: ld returned 1 exit status

any Ideas on how to fix this issue?

I even downloaded fink and apt-get commands to see if I could apt-get install libnsl but it doesn't find that package...


this is what Qt returns when I take -lnsl out:

Qt Code:
  1. g++ -headerpad_max_install_names -arch i386 -o uni-classroom.app/Contents/MacOS/uni-classroom release/local_system_ima.o release/kmultitabbar.o release/italc_side_bar.o release/dialogs.o release/config_widget.o release/cmd_input_dialog.o release/client.o release/classroom_manager.o release/tool_button.o release/tool_bar.o release/snapshot_list.o release/side_bar_widget.o release/remote_control_widget.o release/overview_widget.o release/main_window.o release/main.o release/haveupdates.o release/updater.o release/clientworkspace.o release/tree_widget_menu.o release/about_widget.o release/midetector.o release/singleapplication.o release/help.o release/moc_kmultitabbar.o release/moc_italc_side_bar.o release/moc_config_widget.o release/moc_client.o release/moc_tool_button.o release/moc_tool_bar.o release/moc_snapshot_list.o release/moc_remote_control_widget.o release/moc_overview_widget.o release/moc_haveupdates.o release/moc_updater.o release/moc_classroom_manager.o release/moc_tree_widget_menu.o release/moc_main_window.o release/moc_about_widget.o release/moc_dialogs.o release/moc_cmd_input_dialog.o release/moc_midetector.o release/moc_singleapplication.o release/moc_help.o release/qrc_uni-classroom.o -F/Library/Frameworks -L/Library/Frameworks -L../staticlib/ -L../plugins/attendees -L../libjpeg -lz -lc -llibjpeg -lssl -lcrypto -framework Foundation -lpthread -luni_net -lattendees -framework QtXml -framework QtGui -framework QtNetwork -framework QtCore
  2.  
  3. Undefined symbols:
  4.  
  5. "localSystem::globalConfigPath()", referenced from:
  6.  
  7. mainWindow::instantiateClassroomManagerPlugin(QObject*) in main_window.o
  8.  
  9. mainWindow::instantiateClassroomManagerPlugin(QObject*) in main_window.o
  10.  
  11. "isdConnection::stopAttendanceCall()", referenced from:
  12.  
  13. classroomManager::stopAttendanceCall() in classroom_manager.o
  14.  
  15. "isdConnection::lockDisplay()", referenced from:
  16.  
  17. updateThread::update() in client.o
  18.  
  19. "isdConnection::logonUser(QString const&, QString const&, QString const&)", referenced from:
  20.  
  21. updateThread::update() in client.o
  22.  
  23. "localSystem::personalConfigDir()", referenced from:
  24.  
  25. mainWindow::ensureConfigPathExists() in main_window.o
  26.  
  27. mainWindow::mainWindow(int)in main_window.o
  28.  
  29. "___role", referenced from:
  30.  
  31. ___role$non_lazy_ptr in config_widget.o
  32.  
  33. ___role$non_lazy_ptr in classroom_manager.o
  34.  
  35. ___role$non_lazy_ptr in main_window.o
  36.  
  37. ___role$non_lazy_ptr in main.o
  38.  
  39. (maybe you meant: ___role$non_lazy_ptr)
  40.  
  41. "isdConnection::isdConnection(QString const&, QObject*)", referenced from:
  42.  
  43. mainWindow::mainWindow(int)in main_window.o
  44.  
  45. "isdConnection::attendanceCall(BcAttendees&)", referenced from:
  46.  
  47. mainWindow::callList(BcAttendees&) in main_window.o
  48.  
  49. "localSystem::snapshotDir()", referenced from:
  50.  
  51. snapshotList::reloadList() in snapshot_list.o
  52.  
  53. snapshotList::snapshotDoubleClicked(QString const&) in snapshot_list.o
  54.  
  55. snapshotList::deleteSnapshot() in snapshot_list.o
  56.  
  57. snapshotList::snapshotSelected(QString const&) in snapshot_list.o
  58.  
  59. "isdConnection::sendGetAttendeesListRequest()", referenced from:
  60.  
  61. classroomManager::sendGetAttendeesListRequest() in classroom_manager.o
  62.  
  63. "isdConnection::wakeOtherComputer(QString const&)", referenced from:
  64.  
  65. client::powerOn() in client.o
  66.  
  67. "isdConnection::attendanceCallDefProf(BcAttendees&)", referenced from:
  68.  
  69. mainWindow::callListDefProf(BcAttendees&) in main_window.o
  70.  
  71. "isdConnection::displayTextMessage(QString const&)", referenced from:
  72.  
  73. updateThread::update() in client.o
  74.  
  75. "ivsConnection::ivsConnection(QString const&, ivsConnection::quality, bool, QObject*)", referenced from:
  76.  
  77. client::client(QString const&, QString const&, QString const&, QString const&, IClient::types, mainWindow*, int)in client.o
  78.  
  79. "ivsConnection::rescaleScreen()", referenced from:
  80.  
  81. client::resizeEvent(QResizeEvent*) in client.o
  82.  
  83. "isdConnection::execCmds(QString const&)", referenced from:
  84.  
  85. updateThread::update() in client.o
  86.  
  87. "isdConnection::handleServerMessages()", referenced from:
  88.  
  89. mainWindowUpdateThread::update() in main_window.o
  90.  
  91. "vtable for publicDSAKey", referenced from:
  92.  
  93. __ZTV12publicDSAKey$non_lazy_ptr in main_window.o
  94.  
  95. (maybe you meant: __ZTV12publicDSAKey$non_lazy_ptr)
  96.  
  97. "isdConnection::reset(QString const&, int*)", referenced from:
  98.  
  99. client::userLoggedIn() in client.o
  100.  
  101. updateThread::update() in client.o
  102.  
  103. "isdConnection::powerDownComputer()", referenced from:
  104.  
  105. updateThread::update() in client.o
  106.  
  107. "isdConnection::logoutUser()", referenced from:
  108.  
  109. updateThread::update() in client.o
  110.  
  111. "isdConnection::demoServerAllowClient(QString const&)", referenced from:
  112.  
  113. client::changeMode(IClient::modes) in client.o
  114.  
  115. classroomManager::changeMode_AllowClient(QString) in classroom_manager.o
  116.  
  117. "isdConnection::sendGetUserInformationRequest()", referenced from:
  118.  
  119. client::reload() in client.o
  120.  
  121. "isdConnection::demoServerDenyClient(QString const&)", referenced from:
  122.  
  123. client::changeMode(IClient::modes) in client.o
  124.  
  125. client::changeMode(IClient::modes) in client.o
  126.  
  127. classroomManager::changeMode_DenyClient(QString) in classroom_manager.o
  128.  
  129. "isdConnection::restartComputer()", referenced from:
  130.  
  131. updateThread::update() in client.o
  132.  
  133. "isdConnection::sendGetAttendeesDefProfListRequest()", referenced from:
  134.  
  135. classroomManager::sendGetAttendeesDefProfListRequest() in classroom_manager.o
  136.  
  137. "isdConnection::demoServerRun(int, int)", referenced from:
  138.  
  139. mainWindow::mainWindow(int)in main_window.o
  140.  
  141. "isdConnection::shutdown()", referenced from:
  142.  
  143. _main in main.o
  144.  
  145. "vncView::vncView(QString const&, QWidget*, bool)", referenced from:
  146.  
  147. remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
  148.  
  149. "isdConnection::unlockDisplay()", referenced from:
  150.  
  151. updateThread::update() in client.o
  152.  
  153. "ivsConnection::takeSnapshot()", referenced from:
  154.  
  155. remoteControlWidget::takeSnapshot() in remote_control_widget.o
  156.  
  157. "isdConnection::gracefulClose()", referenced from:
  158.  
  159. mainWindow::~mainWindow()in main_window.o
  160.  
  161. mainWindow::~mainWindow()in main_window.o
  162.  
  163. "localSystem::sleep(int)", referenced from:
  164.  
  165. client::~client()in client.o
  166.  
  167. client::~client()in client.o
  168.  
  169. "messageBox::information(QString const&, QString const&, QPixmap const&)", referenced from:
  170.  
  171. ...
  172.  
  173. loadPersonalConfig() in main.o
  174.  
  175. "vncView::setViewOnly(bool)", referenced from:
  176.  
  177. remoteControlWidget::toggleViewOnly(bool) in remote_control_widget.o
  178.  
  179. "publicDSAKey::load(QString const&, QString)", referenced from:
  180.  
  181. mainWindow::registerNewLicense() in main_window.o
  182.  
  183. mainWindow::activatedLicense() in main_window.o
  184.  
  185. "localSystem::freePort(int)", referenced from:
  186.  
  187. mainWindow::mainWindow(int)in main_window.o
  188.  
  189. "ivsConnection::takeSnapshot(QString)", referenced from:
  190.  
  191. client::paintEvent(QPaintEvent*) in client.o
  192.  
  193. "localSystem::ensurePathExists(QString const&)", referenced from:
  194.  
  195. mainWindow::ensureConfigPathExists() in main_window.o
  196.  
  197. "localSystem::activateWindow(QWidget*)", referenced from:
  198.  
  199. remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
  200.  
  201. "isdConnection::startDemo(QString const&, bool)", referenced from:
  202.  
  203. updateThread::update() in client.o
  204.  
  205. "isdConnection::endStudentAttendance()", referenced from:
  206.  
  207. updateThread::update() in client.o
  208.  
  209. "isdConnection::hideTrayIcon()", referenced from:
  210.  
  211. mainWindow::mainWindow(int)in main_window.o
  212.  
  213. "ivsConnection::handleServerMessages(bool, int)", referenced from:
  214.  
  215. client::reload() in client.o
  216.  
  217. "localSystem::initialize(void (*)(int, bool), QString const&)", referenced from:
  218.  
  219. localSystem::initialize() in local_system_ima.o
  220.  
  221. "localSystem::parameter(QString const&)", referenced from:
  222.  
  223. _main in main.o
  224.  
  225. _main in main.o
  226.  
  227. "isdConnection::disableLocalInputs(bool)", referenced from:
  228.  
  229. remoteControlWidget::lockStudent(bool) in remote_control_widget.o
  230.  
  231. "localSystem::globalConfigPathLock()", referenced from:
  232.  
  233. mainWindow::startTrialVersion() in main_window.o
  234.  
  235. mainWindow::unlockLicenses() in main_window.o
  236.  
  237. mainWindow::mainWindow(int)in main_window.o
  238.  
  239. "isdConnection::initAuthentication()", referenced from:
  240.  
  241. mainWindow::mainWindow(int)in main_window.o
  242.  
  243. ld: symbol(s) not found
  244.  
  245. collect2: ld returned 1 exit status
  246.  
  247. make[1]: *** [uni-classroom.app/Contents/MacOS/uni-classroom] Error 1
  248.  
  249. make: Leaving directory `/Users/tuareg/Desktop/uni/uni-classroom'
  250.  
  251. make: *** [release] Error 2
  252.  
  253. Exited with code 2.
  254.  
  255. Error while building project uni-classroom
  256.  
  257. When executing build step 'Make'
To copy to clipboard, switch view to plain text mode