How to show the error details in Qt compile output - qt

It is really painful to find out which external symbol is missing manually. I did some search on web, but no one has the same issue.
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERSION:1.0 /MANIFEST:embed /OUT:release\viewer.exe #C:\Users\deepcyto\AppData\Local\Temp\viewer.exe.17808.2938.jom
datafiletablemodel.obj : error LNK2019:
release\viewer.exe : fatal error LNK1120: 1

Related

Failed to build qt5.2.1 static with MSVC 2010 x86

I've got Win 7 x64 and i am trying to build static qt5.2.1 from source winth MSVC 2010 x86.
The problem is
Generating Code...
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "
/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' versio
n='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture
='*'" /MANIFEST /MANIFESTFILE:release\musicplayer.exe.embed.manifest /OUT:releas
e\musicplayer.exe #C:\Users\AuST\AppData\Local\Temp\nm7949.tmp
Creating library release\musicplayer.lib and object release\musicplayer.exp
mt.exe /nologo /manifest release\musicplayer.exe.embed.manifest /outputr
esource:release\musicplayer.exe;1
cd quickplayer\ && ( if not exist Makefile E:\Lib\qt521static\qtbase\bin
\qmake E:\Lib\qt521static\qtwinextras\examples\winextras\quickplayer\quickplayer
.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe" -f Makefile
Project ERROR: Plugin qml_winextras is missing a classname entry, please add one
to the qmldir file.
NMAKE : fatal error U1077: 'cd' : return code '0x3'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
What can i do to fix this?
Just in case someone runs into the same issue, not compiling the examples will not work, although it seems an obvious solution. After comparing .qmake.conf in qtwinextras and in another module's directory, I added the following lines to the .qmake.conf (seems like there is a bug with configure for this module):
CONFIG += qt_example_installs
CONFIG += warning_clean
After that, compilation went on fine--of course without examples.

CppUTest examples build fails

I am new to mac!
I download the xcode4.2 and tried to build CppUTest-v3
1)when I do make, I have the following logs
compiling AllTests.cpp
compiling AllocationInCppFile.cpp
compiling CheatSheetTest.cpp
compiling CommandLineArgumentsTest.cpp
compiling CommandLineTestRunnerTest.cpp
compiling JUnitOutputTest.cpp
compiling MemoryLeakDetectorTest.cpp
compiling MemoryLeakOperatorOverloadsTest.cpp
compiling MemoryLeakWarningTest.cpp
compiling NullTestTest.cpp
compiling PluginTest.cpp
compiling PreprocessorTest.cpp
compiling SetPluginTest.cpp
compiling SimpleStringTest.cpp
compiling TestFailureTest.cpp
compiling TestFilterTest.cpp
compiling TestHarness_cTest.cpp
compiling TestInstallerTest.cpp
compiling TestMemoryAllocatorTest.cpp
compiling TestOutputTest.cpp
compiling TestRegistryTest.cpp
compiling TestResultTest.cpp
compiling UtestTest.cpp
compiling AllocationInCFile.c
compiling TestHarness_cTestCFile.c
compiling CommandLineArguments.cpp
compiling CommandLineTestRunner.cpp
compiling JUnitTestOutput.cpp
compiling MemoryLeakDetector.cpp
compiling MemoryLeakWarningPlugin.cpp
compiling SimpleString.cpp
compiling TestFailure.cpp
compiling TestFilter.cpp
compiling TestHarness_c.cpp
compiling TestMemoryAllocator.cpp
compiling TestOutput.cpp
compiling TestPlugin.cpp
compiling TestRegistry.cpp
compiling TestResult.cpp
compiling Utest.cpp
compiling UtestPlatform.cpp
Building archive lib/libCppUTest.a
ar: creating archive lib/libCppUTest.a
a - objs/src/CppUTest/CommandLineArguments.o
a - objs/src/CppUTest/CommandLineTestRunner.o
a - objs/src/CppUTest/JUnitTestOutput.o
a - objs/src/CppUTest/MemoryLeakDetector.o
a - objs/src/CppUTest/MemoryLeakWarningPlugin.o
a - objs/src/CppUTest/SimpleString.o
a - objs/src/CppUTest/TestFailure.o
a - objs/src/CppUTest/TestFilter.o
a - objs/src/CppUTest/TestHarness_c.o
a - objs/src/CppUTest/TestMemoryAllocator.o
a - objs/src/CppUTest/TestOutput.o
a - objs/src/CppUTest/TestPlugin.o
a - objs/src/CppUTest/TestRegistry.o
a - objs/src/CppUTest/TestResult.o
a - objs/src/CppUTest/Utest.o
a - objs/src/Platforms/Gcc/UtestPlatform.o
Linking CppUTest_tests
ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [CppUTest_tests] Error 1
I found out that I can build by using the llvm make command
CC=/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 make
Linking CppUTest_tests
Running CppUTest_tests
..................................................
..................................................
..................................................
..................................................
..................................................
...........................................
OK (293 tests, 293 ran, 791 checks, 0 ignored, 0 filtered out, 7 ms)
2)Then I cd to the examples directory. I got the following errors. I tried to investigate but could not find out how to solve it. Your help will be appreciated.
compiling AllTests.cpp
compiling CircularBuffer.cpp
compiling CircularBufferTest.cpp
compiling EventDispatcher.cpp
compiling EventDispatcherTest.cpp
compiling HelloTest.cpp
compiling MockDocumentationTest.cpp
ApplicationLib/MockDocumentationTest.cpp:193:85: warning: expression result unused [-Wunused-value]
mock_c()->actualCall("foo")->withIntParameters("integer", 10)->returnValue().value.doubleValue;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
1 warning generated.
compiling Printer.cpp
compiling PrinterTest.cpp
compiling hello.c
Building archive lib/libCppUTestExamples.a
ar: creating archive lib/libCppUTestExamples.a
a - objs/ApplicationLib/CircularBuffer.o
a - objs/ApplicationLib/CircularBufferTest.o
a - objs/ApplicationLib/EventDispatcher.o
a - objs/ApplicationLib/EventDispatcherTest.o
a - objs/ApplicationLib/HelloTest.o
a - objs/ApplicationLib/MockDocumentationTest.o
a - objs/ApplicationLib/Printer.o
a - objs/ApplicationLib/PrinterTest.o
a - objs/ApplicationLib/hello.o
Linking CppUTestExamples_tests
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
"mock(SimpleString const&)", referenced from:
TEST_EventDispatcher_EventWithRegistrationForEventResultsIntoCallback_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_EventDispatcher_RegisterTwoObserversResultIntoTwoCallsAndARegistrationNotification_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_GROUP_CppUTestGroupEventDispatcher::setup() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_GROUP_CppUTestGroupEventDispatcher::teardown() in libCppUTestExamples.a(EventDispatcherTest.o)
ObserverMock::notify(Event const&, int)in libCppUTestExamples.a(EventDispatcherTest.o)
ObserverMock::notifyRegistration(EventObserver*) in libCppUTestExamples.a(EventDispatcherTest.o)
productionCode() in libCppUTestExamples.a(MockDocumentationTest.o)
...
"MockNamedValue::getIntValue() const", referenced from:
TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockNamedValue::~MockNamedValue()", referenced from:
TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::setData(SimpleString const&, int)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::setDataObject(SimpleString const&, SimpleString const&, void*)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::getData(SimpleString const&)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockNamedValue::getObjectPointer() const", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"_mock_c", referenced from:
TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"_mock_scope_c", referenced from:
TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [CppUTestExamples_tests] Error 1
I was able to find the location of CppUTest's missing libgcov.a on my Mac running Lion.
/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/libgcov.a
/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcov.a
Apparently these locations aren't in the loaders default search path, so after linking the 64 bit variant to /usr/local/lib I was able to make CppUTest without a hiccup.
sudo ln -s /usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcov.a /usr/local/lib/libgcov.a
Best of luck

compile qt-webkit with mingw32-make for bisecting

I started a bisect qtwebkit and when I try to compile it in the first stage it gave me the following exception. I tried using a older qmake but still it gives the same exception. What does this really mean and how can I fix it.
g++ -c -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DBUILDING_QT__=1 -DWTF_USE_ACCELERATED_COMPOSITING -DUSE_SYSTEM_MALLOC -DNDEBUG -D_HAS_TR1=0 -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include" -I"." -I"..\..\webkit" -I"assembler" -I"bytecode" -I"bytecompiler" -I"debugger" -I"interpreter" -I"jit" -I"parser" -I"pcre" -I"profiler" -I"runtime" -I"wtf" -I"wtf\symbian" -I"wtf\unicode" -I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"\include\QtWebKit" -I"pcre" -I"\JavaScriptCore\tmp" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"c:\QtSDK1.2\mingw\include" -I"c:\QtSDK1.2\mingw\include" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\MainThreadQt.o wtf\qt\MainThreadQt.cpp In file included from wtf\qt\MainThreadQt.cpp:72:
tmp\moc\debug_shared/MainThreadQt.moc:13:2: error: #error "This file was generated using the moc from 4.8.0. It"
tmp\moc\debug_shared/MainThreadQt.moc:14:2: error: #error "cannot be used with the include files from this version of Qt."
tmp\moc\debug_shared/MainThreadQt.moc:15:2: error: #error "(The moc has changed too much.)"
In file included from wtf\qt\MainThreadQt.cpp:72:
tmp\moc\debug_shared/MainThreadQt.moc:42: error: no 'void WTF::MainThreadInvoker::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' member function declared in class 'WTF::MainThreadInvoker'
tmp\moc\debug_shared/MainThreadQt.moc:55: error: 'const QMetaObjectExtraData WTF::MainThreadInvoker::staticMetaObjectExtraData' is not a static member of 'class WTF::MainThreadInvoker'
tmp\moc\debug_shared/MainThreadQt.moc:56: error: 'qt_static_metacall' was not declared in this scope
tmp\moc\debug_shared/MainThreadQt.moc:57: error: too many initializers for 'const QMetaObjectExtraData'
tmp\moc\debug_shared/MainThreadQt.moc:61: error: 'staticMetaObjectExtraData' was not declared in this scope
tmp\moc\debug_shared/MainThreadQt.moc:62: error: too many initializers for 'QMetaObject::<anonymous struct>'
tmp\moc\debug_shared/MainThreadQt.moc: In member function 'virtual int WTF::MainThreadInvoker::qt_metacall(QMetaObject::Call, int, void**)':
tmp\moc\debug_shared/MainThreadQt.moc:88: error: 'qt_static_metacall' was not declared in this scope
mingw32-make[2]: *** [tmp/obj/debug_shared/MainThreadQt.o] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/qtGITSource/qt/src/3rdparty/webkit/JavaScriptCore'
mingw32-make[1]: *** [debug-all] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/qtGITSource/qt/src/3rdparty/webkit/JavaScriptCore'
mingw32-make: *** [sub-JavaScriptCore-make_default-ordered] Error 2
IMHO ll. 2,3 is important:
error "This file was generated using the moc from 4.8.0. It"
error "cannot be used with the include files from this version of Qt."
Your reach a version less than qt 4.8 and all your moc-files were generated in a previous build by moc v4.8. You have to clean your build directory and restart your build command (ensure you use a proper version of qmake, moc etc.).

Qt Opengl configuration for Windows CE

I am trying to configure Qt using the OpenGL parameter for a custom WinCE SDK, but I get a compiler error. I found a similar error faced in the http://www.qtcentre.org/threads/37052-WinCE-OpenGL-ES-build-error?s=7aa5ac49753e1c3f1e0b624bb9134faa post.
The link says to install OpenGL SDK from Imagination Technology, link the library, and include the file to solve the error.
When I tried the mentioned steps, I got linker errors.
link /LIBPATH:"c:\Qt\4.7.4_2\lib" /LIBPATH:"c:\Qt\4.7.4_2\lib" /NOLOGO /
NODEFAULTLIB:OLDNAMES.LIB /DEBUG /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /DLL /
SAFESEH:NO /VERSION:4.74 /OUT:....\lib\QtGuid4.dll #C:\DOCUME~1\VARUN~1.JAJ\LOC
ALS~1\Temp\nm8796.tmp
Creating library ....\lib\QtGuid4.lib and object ....\lib\QtGuid4.exp
qegl.obj : error LNK2019: unresolved external symbol __imp_eglBindAPI referenced
in function "public: bool __cdecl QEglContext::createContext(class QEglContext
*,class QEglProperties const *)" (?createContext#QEglContext##QAA_NPAV1#PBVQEglP
roperties###Z)
....\lib\QtGuid4.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\ce\bi
n\x86_arm\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Has anyone faced similar problems? Could you please suggest me what to do?

:: error: collect2: ld returned 1 exit status with QT and opengl

I'm trying to use a QGLWidget in a QT application, and I've added the "QT += opengl" line into the .pro file but I am now getting :: error: collect2: ld returned 1 exit status when I attempt to compile my program
the compile output shows the following,
Running build steps for project MapEditor...
Configuration unchanged, skipping qmake step.
Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `C:/Qt/2010.05/MapEditor-build-desktop'
C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2010.05/MapEditor-build-desktop'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\MapEditor.exe debug/Main.o debug/window.o debug/glwidget.o debug/moc_window.o debug/moc_glwidget.o -L"c:\Qt\2010.05\qt\lib" -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmaind -lQtOpenGLd4 -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Qt/2010.05/MapEditor-build-desktop'
mingw32-make: Leaving directory `C:/Qt/2010.05/MapEditor-build-desktop'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x14): undefined reference to `GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x18): undefined reference to `GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x118): undefined reference to `non-virtual thunk to GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x11c): undefined reference to `non-virtual thunk to GLWidget::~GLWidget()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\MapEditor.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project MapEditor (target: Desktop)
When executing build step 'Make'
and my .pro file contains the following,
TARGET = MapEditor
TEMPLATE =app
QT += opengl
SOURCES += \
Main.cpp \
window.cpp \
glwidget.cpp
HEADERS += \
window.h \
glwidget.h
Check you .pro file (i.e. project file) that u have added all the class files and header files in SOURCES and HEADERS tags.[For this purpose run qmake command from build menubar options]
Also check that u have declared the Q_OBJECT macro in the starting of your glwidget class.
It looks like some file is missing. Did you add this to your header?
#include <QtOpenGL>

Resources