March 26, 2011

acropole acropole
Lab Rat
5 posts

:: error: collect2: ld returned 1 exit status

 

Hi,

I got this error when linking to autodesk FBX sdk.

The log is :

  1. Creating library file: debug\libfbx.a
  2.  
  3. mingw32-make[1]: Leaving directory `E:/projects/qt/Draupnir/fbx-build-desktop'
  4.  
  5. mingw32-make: Leaving directory `E:/projects/qt/Draupnir/fbx-build-desktop'
  6.  
  7. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../fbx/cfbx.cpp:345: undefined reference to `fbxsdk_2011_3_1::KFbxNode::GetChild(int)'
  8.  
  9. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../fbx/cfbx.cpp:343: undefined reference to `fbxsdk_2011_3_1::KFbxNode::GetChildCount(bool) const'
  10.  
  11. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../../../fbx-sdk-2011.3.1/include/fbxfilesdk/kfbxplugins/kfbxlayer.h:950: undefined reference to `fbxsdk_2011_3_1::KFbxVector4::KFbxVector4()'
  12.  
  13. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../../../fbx-sdk-2011.3.1/include/fbxfilesdk/kfbxplugins/kfbxlayer.h:950: undefined reference to `fbxsdk_2011_3_1::KFbxVector4::~KFbxVector4()'
  14.  
  15. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../../../fbx-sdk-2011.3.1/include/fbxfilesdk/kfbxplugins/kfbxlayer.h:761: undefined reference to `fbxsdk_2011_3_1::KFbxLayerElementArray::GetAt(int, void**, fbxsdk_2011_3_1::EFbxType) const'
  16.  
  17. debug/cfbx.o:E:\projects\qt\Draupnir\fbx-build-desktop/../../../fbx-sdk-2011.3.1/include/fbxfilesdk/kfbxplugins/kfbxlayer.h:761: undefined reference to `fbxsdk_2011_3_1::KFbxLayerElementArray::GetAt(int, void**, fbxsdk_2011_3_1::EFbxType) const'
  18.  
  19. collect2: ld returned 1 exit status
  20.  
  21. mingw32-make[1]: *** [debug\fbx.dll] Error 1
  22.  
  23. mingw32-make: *** [debug] Error 2

and this is my pro :

  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2011-03-26T19:40:57
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT += script scripttools
  8.  
  9. TARGET = fbx
  10. TEMPLATE = lib
  11.  
  12. DEFINES +=  FBX_LIBRARY
  13. DEFINES +=  _M_IX86
  14.  
  15. SOURCES += cfbx.cpp
  16.  
  17. HEADERS += cfbx.h\
  18.         fbx_global.h
  19.  
  20. INCLUDEPATH += \
  21.     "E:\\projects\\fbx-sdk-2011.3.1\\include\\" \
  22.     "E:\\projects\\qt\\Draupnir\\Draupnir\\"
  23.  
  24. FORMS += \
  25.     ImportFBXWidget.ui
  26.  
  27. LIBS += \
  28.     "E:\\projects\\fbx-sdk-2011.3.1\\lib\\vs2005\\fbxsdk_20113_1d.lib"

1 reply

March 28, 2011

ZapB ZapB
Robot Herder
1356 posts

From the name of the path, it looks like your SDK is built for use with MSVC 2005 but you are trying to use MinGW. Try using MSVC 2005 instead or find a build of the sdk lib for MinGW.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

 
  ‹‹ [SOLVED]How to set options with qmake?      setScale(qreal) vs scale(qreal, qreal) ››

You must log in to post a reply. Not a member yet? Register here!