:-1: error: symbol(s) not found for architecture x86_64 AND :-1: error: collect2: ld returned 1 exit status
-
I have defined the constructor and the errors disappear, but then I encounter another problem: the application quits unexpectedly (I am presented with the usual pop-up window form Mac OS where I am given some info and the option to reopen).
@GeoMap::~GeoMap()
{
delete map;
delete coord;
delete mapScene;
delete mapView;
}@ -
From what I can tell, form debugger mode, the problem seems to happen on this line
@ this->mapView->setScene(scene);
@ -
I have done some small modifications in the constructor:
@GeoMap::GeoMap(QGeoMappingManager *mappingManager, QGraphicsView *view) : QGraphicsGeoMap(mappingManager)
{
this->coord = new QGeoCoordinate(45.783008, 24.148178);// QGeoMappingManager *mappingManager = 0;
// QGeoServiceProvider serviceProvider("nokia");
// mappingManager = serviceProvider.mappingManager();
this->map = new QGraphicsGeoMap(mappingManager);this->map->resize(350, 480); this->map->setPos(1, 1); this->map->setCenter(*coord); this->map->setZoomLevel(15); QGraphicsScene *scene = new QGraphicsScene; scene->addItem(this->map);
// this->mapScene->addItem(this->map);
this->mapView = view; this->mapView->setScene(scene);
// this->mapView->setInteractive(true);
}@ -
Looks like you are not creating your graphics view.
-
Yeah ... I figured that could be the problem ... but I don't understand why?
When I move this pard in the main it works like a charm.
I even tried this:@GeoMap::GeoMap(QGeoMappingManager *mappingManager, QGraphicsView *view) : QGraphicsGeoMap(mappingManager)
{
this->coord = new QGeoCoordinate(45.783008, 24.148178);// QGeoMappingManager *mappingManager = 0;
// QGeoServiceProvider serviceProvider("nokia");
// mappingManager = serviceProvider.mappingManager();
this->map = new QGraphicsGeoMap(mappingManager);this->map->resize(350, 480); this->map->setPos(1, 1); this->map->setCenter(*coord); this->map->setZoomLevel(15); QGraphicsScene scene; scene.addItem(this->map);
// this->mapScene->addItem(this->map);
QGraphicsView vview(&scene); vview.setInteractive(true); vview.setVisible(true);
// vview.show();
this->mapView = &vview;
this->mapView->show();// this->mapView = view;
// this->mapView->setScene(scene);
// this->mapView->setVisible(true);
// this->mapView->setInteractive(true);
}
@ -
Well, here you are creating a graphics view: @QGraphicsView vview(&scene);@
Before you didn't create one: @QGraphicsView *mapView;@
Just a pointer to one, which points to something arbitrary because you don't set its value. -
Hi,
I am also facing the same problem on Same operating system.
I include the taglib with my project on windows and it is working fine on windows.
but when i try to run this on mac it give me the same error.
I add code in project.pro file:@
INCLUDPATH +="taglib-1.6.3/include"
LIBS +="taglib-1.6.3/libtaglib.a"
LIBS +=taglib-1.6.3/taglib.dll
@I already added libtaglib.a and taglib.dll in my project along with taglib source code.
I added code on Main:
@
#include "tag.h"
#include "fileref.h"
#include "taglib.h"
#include "taglib_export.h"Q_DECL_EXPORT int main(int argc,char *argv[])
{
TagLib::FileName filepath("song.mp3");
TagLib::FileRef f(filepath);
TagLib::String artist=f.tag()->artist();
aDebug()<<"Artist="<< artist.toCString();
}
@This code is working for windows but not for OSX.
[EDIT: code formatting, please wrap in @-tags]
-
you cannot use a .dll on a Mac. DLLs are Windows only.
Also, make sure to have the correct architectures for your executable. The Mac support so called universal binaries, that is code for multiple architectures (intel/ppc, 32/64 bit) in on big "fat" file.
Seems like your library is not built with x86_64 architecture.
-
I compiled Taglib for Mac using cmake under this conditions
CMAKE_BUILD_TYPE=Release
CMAKE_OSX_ARCHITECTURE=x86_64
CMAKE_OSX_DEPLOYMENT_TARGET=10.6I added in project.pro file
LIBS += taglib-1.6.3/taglib/libtag.1.6.3.dylibWhen i build this project it crash on start and give me following error.
Process: Project [2697]
Path: /30July/Project-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/Project.app/Contents/MacOS/Project
Identifier: com.yourcompany.Project
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Qt Creator [1388]Date/Time: 2012-07-29 10:26:07.262 +0530
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6Interval Since Last Report: 431809 sec
Crashes Since Last Report: 87
Per-App Interval Since Last Report: 6045 sec
Per-App Crashes Since Last Report: 87
Anonymous UUID: 9B4C4495-E766-4E88-A3AC-F75CA5B720D1Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-threadThread 0 Crashed: Dispatch queue: com.apple.main-thread
0 com.yourcompany.Project 0x0000000100007f9e searchfile(QDir) + 1774
1 com.yourcompany.Project 0x0000000100008c99 track_data::track_get_data() + 89
2 com.yourcompany.Project 0x000000010000430d main + 237
3 com.yourcompany.Project 0x00000001000041f8 start + 52Thread 1: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff824fcc0a kevent + 10
1 libSystem.B.dylib 0x00007fff824feadd _dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff824fe7b4 _dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff824fe2de _dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff824fdc08 _pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff824fdaa5 start_wqthread + 13Thread 2:
0 libSystem.B.dylib 0x00007fff824fda2a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff824fde3c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff824fdaa5 start_wqthread + 13Thread 3:
0 libSystem.B.dylib 0x00007fff8251ea6a __semwait_signal + 10
1 libSystem.B.dylib 0x00007fff82522881 _pthread_cond_wait + 1286
2 QtScript 0x000000010079a176 QTWTF::TCMalloc_PageHeap::scavengerThread() + 118
3 QtScript 0x000000010079a1b9 QTWTF::TCMalloc_PageHeap::runScavengerThread(void*) + 9
4 libSystem.B.dylib 0x00007fff8251cfd6 _pthread_start + 331
5 libSystem.B.dylib 0x00007fff8251ce89 thread_start + 13Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000102392a78 rcx: 0x0000000000000010 rdx: 0x00007fff703d0650
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x00007fff5fbff6a0 rsp: 0x00007fff5fbff2d0
r8: 0x0000000000008000 r9: 0x0000000010238ecf r10: 0x0000000000000001 r11: 0x0000000000000001
r12: 0x00007fff5fbff560 r13: 0x00007fff5fbff5e0 r14: 0x0000000000000000 r15: 0x00007fff5fbff480
rip: 0x0000000100007f9e rfl: 0x0000000000010206 cr2: 0x0000000000000000Binary Images:
0x100000000 - 0x100084fef +com.yourcompany.Project ??? (???) <5C64C9F1-D7DD-21A1-3301-BA63561C6E42> /30July/Project-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/Project.app/Contents/MacOS/Project
0x100090000 - 0x10010cff7 +libtag.1.dylib 1.6.3 (compatibility 1.0.0) <39492430-1D41-9E2F-AA41-8A0DB805CB24> /Users/ngtech/Desktop/taglibDy13/taglib/libtag.1.dylib
0x100142000 - 0x1004cefef +QtDeclarative 4.8.1 (compatibility 4.8.0) <4FB02A99-E073-84C2-F627-404945573DFD> /Users/ngtech/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtDeclarative.framework/Versions/4/QtDeclarative
0x100642000 - 0x100899fff +QtScript 4.8.1 (compatibility 4.8.0) <088A5B4A-34E6-1760-5198-2725F84D0B88> /Users/ngtech/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtScript.framework/Versions/4/QtScript
0x100954000 - 0x100c20fff +QtCore 4.8.1 (compatibility 4.8.0) <6B9A68BA-E0D1-DCBB-F398-85C71CEEB8CA> /Users/ngtech/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/Versions/4/QtCore -
Thank you Volker with the help of your post i am able to solve this problem.
-
Hi,
I face some other problem with TagLib.
I compiled Taglib for Mac 10.6 using cmake under this conditions
CMAKE_BUILD_TYPE=Release
CMAKE_OSX_ARCHITECTURE=x86_64
CMAKE_OSX_DEPLOYMENT_TARGET=10.6
as in image
"Click Here for image":https://docs.google.com/document/d/1Hu_SGJuXSCANEZ4IsuhQP4VzLx6EonTgLWlkXgr4lP8/editTarget folder : user/ngtech/desktop/taglibDy13
This is working fine on the source machine. But when i move the code on other MAC machine with same environment , i faced a error when i remove taglibDy13 folder from desktop.
library not loaded : /user/ngtech/desktop/taglibDy13/taglib/libtag.1.dylib.
I already copied required .dylib files in my project
@INCLUDEPATH +="taglib-1.6.3/include"
LIBS += "taglib-1.6.3/libtag.1.6.3.dylib"@Can any one tell me how can i make this distributed library so that i can run my project on other computers.