crossplatform.ru

Здравствуйте, гость ( Вход | Регистрация )

> error: collect2: ld returned 1 exit status
epishev
  опции профиля:
сообщение 10.1.2012, 11:44
Сообщение #1


Студент
*

Группа: Участник
Сообщений: 89
Регистрация: 23.3.2011
Пользователь №: 2533

Спасибо сказали: 0 раз(а)




Репутация:   0  


Всем привет!
Есть такая проблемма....

пытаюсь скомпилировать простое приложение с формой + подключаю стороннюю библиотеку (CONFIG_AND_OPTIONS.h)

.pro
QT       += core gui

TARGET = JIN_QuestEditor
TEMPLATE = app

INCLUDEPATH += D:/GIT/ENJIN_2
INCLUDEPATH += D:/GIT/ENJIN_2/_includes

LIBS += -LD:/GIT/ENJIN_2/_libraries/win/dx -d3d9 -d3dx9
LIBS += -LD:/GIT/ENJIN_2/_libraries/win -gdi32

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

main.cpp
#define JIN_WIN_COMPILE
#define JIN_DEBUG

#include "CONFIG_AND_OPTIONS.h"

#include <QtGui/QApplication>
#include "mainwindow.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}


В результате получаю ошибку:

:: error: collect2: ld returned 1 exit status

консоль сборки:
Раскрывающийся текст
Выполняется сборка проекта JIN_QuestEditor...
Настройки не изменились, этап qmake пропускается.
Запускается "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `D:/test qt+jin/JIN_QuestEditor-build-desktop'

C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Release

mingw32-make[1]: Entering directory `D:/test qt+jin/JIN_QuestEditor-build-desktop'

g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2010.05\qt\include\QtCore" -I"c:\Qt\2010.05\qt\include\QtGui" -I"c:\Qt\2010.05\qt\include" -I"..\..\GIT\ENJIN_2" -I"..\..\GIT\ENJIN_2\_includes" -I"c:\Qt\2010.05\qt\include\ActiveQt" -I"release" -I"." -I"..\JIN_QuestEditor" -I"." -I"c:\Qt\2010.05\qt\mkspecs\win32-g++" -o release\main.o ..\JIN_QuestEditor\main.cpp

In file included from ..\..\GIT\ENJIN_2/ENJIN.h:94,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/DATATYPES.h:58: warning: this decimal constant is unsigned only in ISO C90

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:290,

from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:46,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9types.h:25: warning: ignoring #pragma warning

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:290,

from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:46,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9types.h:2411: warning: ignoring #pragma warning

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:46,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:2025:1: warning: "/*" within comment

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:2026:1: warning: "/*" within comment

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:47,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.h:19: warning: ignoring #pragma warning

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:47,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.h:1792: warning: ignoring #pragma warning

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:48,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9core.h:669:1: warning: multi-line comment

In file included from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:12,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:2025:1: warning: "/*" within comment

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3d9.h:2026:1: warning: "/*" within comment

In file included from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.h:1787,

from ..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9.h:47,

from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:11,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In constructor 'D3DXVECTOR2_16F::D3DXVECTOR2_16F(const D3DXFLOAT16*)':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:227: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR2_16F::operator==(const D3DXVECTOR2_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:256: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:256: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR2_16F::operator!=(const D3DXVECTOR2_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:262: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:262: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In constructor 'D3DXVECTOR3_16F::D3DXVECTOR3_16F(const D3DXFLOAT16*)':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:456: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR3_16F::operator==(const D3DXVECTOR3_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:487: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:487: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR3_16F::operator!=(const D3DXVECTOR3_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:494: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:494: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In constructor 'D3DXVECTOR4_16F::D3DXVECTOR4_16F(const D3DXFLOAT16*)':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:687: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:688: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR4_16F::operator==(const D3DXVECTOR4_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:728: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:728: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:729: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:729: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In member function 'BOOL D3DXVECTOR4_16F::operator!=(const D3DXVECTOR4_16F&) const':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:735: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:735: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:736: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:736: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In static member function 'static void* _D3DXMATRIXA16::operator new(size_t)':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:993: warning: 'operator new' must not return NULL unless it is declared 'throw()' (or -fcheck-new is in effect)

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl: In static member function 'static void* _D3DXMATRIXA16::operator new [](size_t)':

..\..\GIT\ENJIN_2/win/../_includes/win/dx/d3dx9math.inl:1008: warning: 'operator new' must not return NULL unless it is declared 'throw()' (or -fcheck-new is in effect)

In file included from ..\..\GIT\ENJIN_2/win/JC_RENDER.h:19,

from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/JC_CAMERA.h: In member function 'void JIN::JC_CAMERA::UpdateView()':

..\..\GIT\ENJIN_2/win/JC_CAMERA.h:378: warning: dereferencing type-punned pointer will break strict-aliasing rules

In file included from ..\..\GIT\ENJIN_2/ENJIN.h:254,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/JC_RENDER.h: In member function 'int JIN::JC_RENDER::fLightSet(JIN::JS_LIGHT*, int)':

..\..\GIT\ENJIN_2/win/JC_RENDER.h:79: warning: no return statement in function returning non-void

..\..\GIT\ENJIN_2/win/JC_RENDER.h: In member function 'void JIN::JC_RENDER::fRenderPoint(int, int, JIN::JS_COLOR, float)':

..\..\GIT\ENJIN_2/win/JC_RENDER.h:399: warning: dereferencing type-punned pointer will break strict-aliasing rules

..\..\GIT\ENJIN_2/win/JC_RENDER.h: In member function 'void JIN::JC_RENDER::fRenderLine(int, int, int, int, JIN::JS_COLOR)':

..\..\GIT\ENJIN_2/win/JC_RENDER.h:433: warning: dereferencing type-punned pointer will break strict-aliasing rules

In file included from ..\..\GIT\ENJIN_2/ENJIN.h:283,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_TIMER.h: In member function 'float JIN::JC_TIMER::fSetGlobalDt(float*)':

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_TIMER.h:29: warning: no return statement in function returning non-void

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_TIMER.h: In member function 'float JIN::JC_TIMER::fSetClipTime(float)':

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_TIMER.h:31: warning: no return statement in function returning non-void

In file included from ..\..\GIT\ENJIN_2/ENJIN.h:294,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_INPUT.h: In member function 'int JIN::JC_INPUT::fUpdate()':

..\..\GIT\ENJIN_2/J_SYSTEMS/JC_INPUT.h:159: warning: no return statement in function returning non-void

In file included from ..\..\GIT\ENJIN_2/ENJIN.h:382,

from ..\..\GIT\ENJIN_2/CONFIG_AND_OPTIONS.h:116,

from ..\JIN_QuestEditor\main.cpp:4:

..\..\GIT\ENJIN_2/win/J_INPUT_PROC.h: In function 'LRESULT JIN::JWndProccess(HWND__*, UINT, WPARAM, LPARAM)':

..\..\GIT\ENJIN_2/win/J_INPUT_PROC.h:28: warning: unused variable 'hDC'

..\..\GIT\ENJIN_2/win/J_INPUT_PROC.h:29: warning: unused variable 'ps'

..\..\GIT\ENJIN_2/win/J_INPUT_PROC.h:30: warning: unused variable 'rect'

..\..\GIT\ENJIN_2/win/J_INPUT_PROC.h:31: warning: unused variable 'p'

..\..\GIT\ENJIN_2/J_SYSTEMS/J_GAME_SERVICE.h: In member function 'int JIN::JC_GAME::fInitialise(char*)':

..\..\GIT\ENJIN_2/J_SYSTEMS/J_GAME_SERVICE.h:158: warning: control reaches end of non-void function

..\..\GIT\ENJIN_2/win/JC_RENDER.h: In member function 'int JIN::JC_RENDER::fEndScene()':

..\..\GIT\ENJIN_2/win/JC_RENDER.h:288: warning: control reaches end of non-void function

..\..\GIT\ENJIN_2/win/JC_RENDER.h: In member function 'int JIN::JC_RENDER::fBeginScene()':

..\..\GIT\ENJIN_2/win/JC_RENDER.h:272: warning: control reaches end of non-void function

..\..\GIT\ENJIN_2/win/JC_WND.h: In member function 'int JIN::JC_WND::fInit(const char*)':

..\..\GIT\ENJIN_2/win/JC_WND.h:77: warning: control reaches end of non-void function

g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\JIN_QuestEditor.exe release/main.o release/mainwindow.o release/moc_mainwindow.o -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmain -LD:/GIT/ENJIN_2/_libraries/win/dx -d3d9 -d3dx9 -LD:/GIT/ENJIN_2/_libraries/win -gdi32 -lQtGui4 -lQtCore4

..\..\GIT\ENJIN_2/win/../J_DATATYPES/J_MATRIX4x4f.h: At global scope:

..\..\GIT\ENJIN_2/win/../J_DATATYPES/J_MATRIX4x4f.h:382: warning: 'JIN::JC_MATRIX4 JIN::fInvertMatrix(const JIN::JC_MATRIX4*)' defined but not used

..\..\GIT\ENJIN_2/win/../J_DATATYPES/J_MATRIX4x4f.h:390: warning: 'JIN::JC_MATRIX4 JIN::fTranspose(const JIN::JC_MATRIX4*)' defined but not used

mingw32-make[1]: Leaving directory `D:/test qt+jin/JIN_QuestEditor-build-desktop'

mingw32-make: Leaving directory `D:/test qt+jin/JIN_QuestEditor-build-desktop'

release/main.o:main.cpp:(.text+0x1596): undefined reference to `D3DXMatrixTranslation@16'

release/main.o:main.cpp:(.text+0x15af): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x15cf): undefined reference to `D3DXMatrixRotationYawPitchRoll@16'

release/main.o:main.cpp:(.text+0x15e2): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x1604): undefined reference to `D3DXMatrixTranslation@16'

release/main.o:main.cpp:(.text+0x1617): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x1637): undefined reference to `D3DXMatrixScaling@16'

release/main.o:main.cpp:(.text+0x164a): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x16a6): undefined reference to `D3DXMatrixTranslation@16'

release/main.o:main.cpp:(.text+0x16c8): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x16ea): undefined reference to `D3DXMatrixRotationYawPitchRoll@16'

release/main.o:main.cpp:(.text+0x16fd): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x171f): undefined reference to `D3DXMatrixTranslation@16'

release/main.o:main.cpp:(.text+0x1732): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x1752): undefined reference to `D3DXMatrixScaling@16'

release/main.o:main.cpp:(.text+0x1765): undefined reference to `D3DXMatrixMultiply@12'

release/main.o:main.cpp:(.text+0x2050): undefined reference to `D3DXCreateTexture@32'

release/main.o:main.cpp:(.text+0x2b5d): undefined reference to `GetStockObject@4'

release/main.o:main.cpp:(.text+0x2dcb): undefined reference to `timeGetTime@0'

release/main.o:main.cpp:(.text+0x2ee8): undefined reference to `Direct3DCreate9@4'

release/main.o:main.cpp:(.text+0x3374): undefined reference to `D3DXMatrixRotationYawPitchRoll@16'

release/main.o:main.cpp:(.text+0x34b1): undefined reference to `D3DXMatrixLookAtLH@16'

release/main.o:main.cpp:(.text+0x3584): undefined reference to `D3DXMatrixPerspectiveFovLH@20'

release/main.o:main.cpp:(.text+0x3fb6): undefined reference to `D3DXGetImageInfoFromFileA@8'

release/main.o:main.cpp:(.text+0x4020): undefined reference to `D3DXCreateTextureFromFileExA@56'

release/main.o:main.cpp:(.text+0x2c58): undefined reference to `timeGetTime@0'

collect2: ld returned 1 exit status

mingw32-make[1]: *** [release\JIN_QuestEditor.exe] Error 1

mingw32-make: *** [release] Error 2

Процесс "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" завершился с кодом %2.
Возникла ошибка при сборке проекта JIN_QuestEditor (цель: Настольный компьютер)
Во время выполнения сборки на этапе "Сборка"


В чем может быть проблема?
Что делаю не так?

Заранее спасибо!
Перейти в начало страницы
 
Быстрая цитата+Цитировать сообщение
 
Начать новую тему
Ответов
BRE
  опции профиля:
сообщение 10.1.2012, 12:50
Сообщение #2


Профессионал
*****

Группа: Участник
Сообщений: 1112
Регистрация: 6.3.2009
Из: Ростов-на-Дону
Пользователь №: 591

Спасибо сказали: 264 раз(а)




Репутация:   44  


Осталось подключить библиотеку содержащую функцию timeGetTime, это вроде winmm, добавь еще -lwinmm
Перейти в начало страницы
 
Быстрая цитата+Цитировать сообщение
epishev
  опции профиля:
сообщение 10.1.2012, 13:40
Сообщение #3


Студент
*

Группа: Участник
Сообщений: 89
Регистрация: 23.3.2011
Пользователь №: 2533

Спасибо сказали: 0 раз(а)




Репутация:   0  


Цитата(BRE @ 10.1.2012, 12:50) *
Осталось подключить библиотеку содержащую функцию timeGetTime, это вроде winmm, добавь еще -lwinmm

Спасибо!
Перейти в начало страницы
 
Быстрая цитата+Цитировать сообщение

Сообщений в этой теме


Быстрый ответОтветить в данную темуНачать новую тему
Теги
Нет тегов для показа


1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0




RSS Текстовая версия Сейчас: 25.11.2024, 22:40