rickrvo
7th September 2011, 18:31
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:
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
Undefined symbols:
"localSystem::globalConfigPath()", referenced from:
mainWindow::instantiateClassroomManagerPlugin(QObj ect*) in main_window.o
mainWindow::instantiateClassroomManagerPlugin(QObj ect*) in main_window.o
"isdConnection::stopAttendanceCall()", referenced from:
classroomManager::stopAttendanceCall() in classroom_manager.o
"isdConnection::lockDisplay()", referenced from:
updateThread::update() in client.o
"isdConnection::logonUser(QString const&, QString const&, QString const&)", referenced from:
updateThread::update() in client.o
"localSystem::personalConfigDir()", referenced from:
mainWindow::ensureConfigPathExists() in main_window.o
mainWindow::mainWindow(int)in main_window.o
"___role", referenced from:
___role$non_lazy_ptr in config_widget.o
___role$non_lazy_ptr in classroom_manager.o
___role$non_lazy_ptr in main_window.o
___role$non_lazy_ptr in main.o
(maybe you meant: ___role$non_lazy_ptr)
"isdConnection::isdConnection(QString const&, QObject*)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"isdConnection::attendanceCall(BcAttendees&)", referenced from:
mainWindow::callList(BcAttendees&) in main_window.o
"localSystem::snapshotDir()", referenced from:
snapshotList::reloadList() in snapshot_list.o
snapshotList::snapshotDoubleClicked(QString const&) in snapshot_list.o
snapshotList::deleteSnapshot() in snapshot_list.o
snapshotList::snapshotSelected(QString const&) in snapshot_list.o
"isdConnection::sendGetAttendeesListRequest()", referenced from:
classroomManager::sendGetAttendeesListRequest() in classroom_manager.o
"isdConnection::wakeOtherComputer(QString const&)", referenced from:
client::powerOn() in client.o
"isdConnection::attendanceCallDefProf(BcAttendees&)", referenced from:
mainWindow::callListDefProf(BcAttendees&) in main_window.o
"isdConnection::displayTextMessage(QString const&)", referenced from:
updateThread::update() in client.o
"ivsConnection::ivsConnection(QString const&, ivsConnection::quality, bool, QObject*)", referenced from:
client::client(QString const&, QString const&, QString const&, QString const&, IClient::types, mainWindow*, int)in client.o
"ivsConnection::rescaleScreen()", referenced from:
client::resizeEvent(QResizeEvent*) in client.o
"isdConnection::execCmds(QString const&)", referenced from:
updateThread::update() in client.o
"isdConnection::handleServerMessages()", referenced from:
mainWindowUpdateThread::update() in main_window.o
"vtable for publicDSAKey", referenced from:
__ZTV12publicDSAKey$non_lazy_ptr in main_window.o
(maybe you meant: __ZTV12publicDSAKey$non_lazy_ptr)
"isdConnection::reset(QString const&, int*)", referenced from:
client::userLoggedIn() in client.o
updateThread::update() in client.o
"isdConnection::powerDownComputer()", referenced from:
updateThread::update() in client.o
"isdConnection::logoutUser()", referenced from:
updateThread::update() in client.o
"isdConnection::demoServerAllowClient(QString const&)", referenced from:
client::changeMode(IClient::modes) in client.o
classroomManager::changeMode_AllowClient(QString) in classroom_manager.o
"isdConnection::sendGetUserInformationRequest()", referenced from:
client::reload() in client.o
"isdConnection::demoServerDenyClient(QString const&)", referenced from:
client::changeMode(IClient::modes) in client.o
client::changeMode(IClient::modes) in client.o
classroomManager::changeMode_DenyClient(QString) in classroom_manager.o
"isdConnection::restartComputer()", referenced from:
updateThread::update() in client.o
"isdConnection::sendGetAttendeesDefProfListRequest( )", referenced from:
classroomManager::sendGetAttendeesDefProfListReque st() in classroom_manager.o
"isdConnection::demoServerRun(int, int)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"isdConnection::shutdown()", referenced from:
_main in main.o
"vncView::vncView(QString const&, QWidget*, bool)", referenced from:
remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
"isdConnection::unlockDisplay()", referenced from:
updateThread::update() in client.o
"ivsConnection::takeSnapshot()", referenced from:
remoteControlWidget::takeSnapshot() in remote_control_widget.o
"isdConnection::gracefulClose()", referenced from:
mainWindow::~mainWindow()in main_window.o
mainWindow::~mainWindow()in main_window.o
"localSystem::sleep(int)", referenced from:
client::~client()in client.o
client::~client()in client.o
"messageBox::information(QString const&, QString const&, QPixmap const&)", referenced from:
...
loadPersonalConfig() in main.o
"vncView::setViewOnly(bool)", referenced from:
remoteControlWidget::toggleViewOnly(bool) in remote_control_widget.o
"publicDSAKey::load(QString const&, QString)", referenced from:
mainWindow::registerNewLicense() in main_window.o
mainWindow::activatedLicense() in main_window.o
"localSystem::freePort(int)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"ivsConnection::takeSnapshot(QString)", referenced from:
client::paintEvent(QPaintEvent*) in client.o
"localSystem::ensurePathExists(QString const&)", referenced from:
mainWindow::ensureConfigPathExists() in main_window.o
"localSystem::activateWindow(QWidget*)", referenced from:
remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
"isdConnection::startDemo(QString const&, bool)", referenced from:
updateThread::update() in client.o
"isdConnection::endStudentAttendance()", referenced from:
updateThread::update() in client.o
"isdConnection::hideTrayIcon()", referenced from:
mainWindow::mainWindow(int)in main_window.o
"ivsConnection::handleServerMessages(bool, int)", referenced from:
client::reload() in client.o
"localSystem::initialize(void (*)(int, bool), QString const&)", referenced from:
localSystem::initialize() in local_system_ima.o
"localSystem::parameter(QString const&)", referenced from:
_main in main.o
_main in main.o
"isdConnection::disableLocalInputs(bool)", referenced from:
remoteControlWidget::lockStudent(bool) in remote_control_widget.o
"localSystem::globalConfigPathLock()", referenced from:
mainWindow::startTrialVersion() in main_window.o
mainWindow::unlockLicenses() in main_window.o
mainWindow::mainWindow(int)in main_window.o
"isdConnection::initAuthentication()", referenced from:
mainWindow::mainWindow(int)in main_window.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [uni-classroom.app/Contents/MacOS/uni-classroom] Error 1
make: Leaving directory `/Users/tuareg/Desktop/uni/uni-classroom'
make: *** [release] Error 2
Exited with code 2.
Error while building project uni-classroom
When executing build step 'Make'
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:
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
Undefined symbols:
"localSystem::globalConfigPath()", referenced from:
mainWindow::instantiateClassroomManagerPlugin(QObj ect*) in main_window.o
mainWindow::instantiateClassroomManagerPlugin(QObj ect*) in main_window.o
"isdConnection::stopAttendanceCall()", referenced from:
classroomManager::stopAttendanceCall() in classroom_manager.o
"isdConnection::lockDisplay()", referenced from:
updateThread::update() in client.o
"isdConnection::logonUser(QString const&, QString const&, QString const&)", referenced from:
updateThread::update() in client.o
"localSystem::personalConfigDir()", referenced from:
mainWindow::ensureConfigPathExists() in main_window.o
mainWindow::mainWindow(int)in main_window.o
"___role", referenced from:
___role$non_lazy_ptr in config_widget.o
___role$non_lazy_ptr in classroom_manager.o
___role$non_lazy_ptr in main_window.o
___role$non_lazy_ptr in main.o
(maybe you meant: ___role$non_lazy_ptr)
"isdConnection::isdConnection(QString const&, QObject*)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"isdConnection::attendanceCall(BcAttendees&)", referenced from:
mainWindow::callList(BcAttendees&) in main_window.o
"localSystem::snapshotDir()", referenced from:
snapshotList::reloadList() in snapshot_list.o
snapshotList::snapshotDoubleClicked(QString const&) in snapshot_list.o
snapshotList::deleteSnapshot() in snapshot_list.o
snapshotList::snapshotSelected(QString const&) in snapshot_list.o
"isdConnection::sendGetAttendeesListRequest()", referenced from:
classroomManager::sendGetAttendeesListRequest() in classroom_manager.o
"isdConnection::wakeOtherComputer(QString const&)", referenced from:
client::powerOn() in client.o
"isdConnection::attendanceCallDefProf(BcAttendees&)", referenced from:
mainWindow::callListDefProf(BcAttendees&) in main_window.o
"isdConnection::displayTextMessage(QString const&)", referenced from:
updateThread::update() in client.o
"ivsConnection::ivsConnection(QString const&, ivsConnection::quality, bool, QObject*)", referenced from:
client::client(QString const&, QString const&, QString const&, QString const&, IClient::types, mainWindow*, int)in client.o
"ivsConnection::rescaleScreen()", referenced from:
client::resizeEvent(QResizeEvent*) in client.o
"isdConnection::execCmds(QString const&)", referenced from:
updateThread::update() in client.o
"isdConnection::handleServerMessages()", referenced from:
mainWindowUpdateThread::update() in main_window.o
"vtable for publicDSAKey", referenced from:
__ZTV12publicDSAKey$non_lazy_ptr in main_window.o
(maybe you meant: __ZTV12publicDSAKey$non_lazy_ptr)
"isdConnection::reset(QString const&, int*)", referenced from:
client::userLoggedIn() in client.o
updateThread::update() in client.o
"isdConnection::powerDownComputer()", referenced from:
updateThread::update() in client.o
"isdConnection::logoutUser()", referenced from:
updateThread::update() in client.o
"isdConnection::demoServerAllowClient(QString const&)", referenced from:
client::changeMode(IClient::modes) in client.o
classroomManager::changeMode_AllowClient(QString) in classroom_manager.o
"isdConnection::sendGetUserInformationRequest()", referenced from:
client::reload() in client.o
"isdConnection::demoServerDenyClient(QString const&)", referenced from:
client::changeMode(IClient::modes) in client.o
client::changeMode(IClient::modes) in client.o
classroomManager::changeMode_DenyClient(QString) in classroom_manager.o
"isdConnection::restartComputer()", referenced from:
updateThread::update() in client.o
"isdConnection::sendGetAttendeesDefProfListRequest( )", referenced from:
classroomManager::sendGetAttendeesDefProfListReque st() in classroom_manager.o
"isdConnection::demoServerRun(int, int)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"isdConnection::shutdown()", referenced from:
_main in main.o
"vncView::vncView(QString const&, QWidget*, bool)", referenced from:
remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
"isdConnection::unlockDisplay()", referenced from:
updateThread::update() in client.o
"ivsConnection::takeSnapshot()", referenced from:
remoteControlWidget::takeSnapshot() in remote_control_widget.o
"isdConnection::gracefulClose()", referenced from:
mainWindow::~mainWindow()in main_window.o
mainWindow::~mainWindow()in main_window.o
"localSystem::sleep(int)", referenced from:
client::~client()in client.o
client::~client()in client.o
"messageBox::information(QString const&, QString const&, QPixmap const&)", referenced from:
...
loadPersonalConfig() in main.o
"vncView::setViewOnly(bool)", referenced from:
remoteControlWidget::toggleViewOnly(bool) in remote_control_widget.o
"publicDSAKey::load(QString const&, QString)", referenced from:
mainWindow::registerNewLicense() in main_window.o
mainWindow::activatedLicense() in main_window.o
"localSystem::freePort(int)", referenced from:
mainWindow::mainWindow(int)in main_window.o
"ivsConnection::takeSnapshot(QString)", referenced from:
client::paintEvent(QPaintEvent*) in client.o
"localSystem::ensurePathExists(QString const&)", referenced from:
mainWindow::ensureConfigPathExists() in main_window.o
"localSystem::activateWindow(QWidget*)", referenced from:
remoteControlWidget::remoteControlWidget(QString const&, bool, mainWindow*)in remote_control_widget.o
"isdConnection::startDemo(QString const&, bool)", referenced from:
updateThread::update() in client.o
"isdConnection::endStudentAttendance()", referenced from:
updateThread::update() in client.o
"isdConnection::hideTrayIcon()", referenced from:
mainWindow::mainWindow(int)in main_window.o
"ivsConnection::handleServerMessages(bool, int)", referenced from:
client::reload() in client.o
"localSystem::initialize(void (*)(int, bool), QString const&)", referenced from:
localSystem::initialize() in local_system_ima.o
"localSystem::parameter(QString const&)", referenced from:
_main in main.o
_main in main.o
"isdConnection::disableLocalInputs(bool)", referenced from:
remoteControlWidget::lockStudent(bool) in remote_control_widget.o
"localSystem::globalConfigPathLock()", referenced from:
mainWindow::startTrialVersion() in main_window.o
mainWindow::unlockLicenses() in main_window.o
mainWindow::mainWindow(int)in main_window.o
"isdConnection::initAuthentication()", referenced from:
mainWindow::mainWindow(int)in main_window.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [uni-classroom.app/Contents/MacOS/uni-classroom] Error 1
make: Leaving directory `/Users/tuareg/Desktop/uni/uni-classroom'
make: *** [release] Error 2
Exited with code 2.
Error while building project uni-classroom
When executing build step 'Make'