Trying to install qt-pods on windows - c++

Im trying to install qt-pods on windows.
I downloaded the qt-pods package from github to my pc.
then i went into the folder and tried to run qmake && make.
the qmake succeed with no errors (i did it also alone for checking) but the 'make' threw me the following errors:
...a lot of errors like this...
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.text$_ZN10PodManagerD0Ev[_ZN10PodManagerD0Ev]+0x14): undefined reference to `__imp__ZN7QObjectD2Ev'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.text.startup+0x3): undefined reference to `__imp__ZN7QObject16staticMetaObjectE'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x38): undefined reference to `QObject::event(QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x40): undefined reference to `QObject::eventFilter(QObject*, QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x48): undefined reference to `QObject::timerEvent(QTimerEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x50): undefined reference to `QObject::childEvent(QChildEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x58): undefined reference to `QObject::customEvent(QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x60): undefined reference to `QObject::connectNotify(QMetaMethod const&)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x68): undefined reference to `QObject::disconnectNotify(QMetaMethod const&)'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile.Release:87: release\qt-pods-gui.exe] Error 1
make[2]: Leaving directory 'F:/Users/matan_000/Documents/Programming/c++-libraries/qt-pods/qt-pods-gui'
make[1]: *** [Makefile:36: release] Error 2
make[1]: Leaving directory 'F:/Users/matan_000/Documents/Programming/c++-libraries/qt-pods/qt-pods-gui'
make: *** [Makefile:95: sub-qt-pods-gui-make_first] Error 2
and a lot of errors like this before...
Im almost hopeless...
I will be happy to help! thank you! :)

Related

Undefined reference when building AzerothCore module

I followed the steps on how to install azerothcore. I remembered I could add Modules, so I went in the website of azerothcore and downloaded a few modules. Before I downloaded them I checked and saw it says that it's building on master core, but for some reason I have the following error:
/usr/bin/ld: ../../../modules/libmodules.a(ModulesLoader.cpp.o): in function `AddModulesScripts()':
/root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:60: undefined reference to `Addmod_1v1_arena_masterScripts()'
/usr/bin/ld: /root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:61: undefined reference to `Addmod_boss_announcer_masterScripts()'
/usr/bin/ld: /root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:63: undefined reference to `Addmod_npc_buffer_masterScripts()'
/usr/bin/ld: /root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:64: undefined reference to `Addmod_npc_spectator_masterScripts()'
/usr/bin/ld: /root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:65: undefined reference to `Addmod_reward_shop_masterScripts()'
/usr/bin/ld: /root/azerothcore/build/modules/gen_scriptloader/static/ModulesLoader.cpp:66: undefined reference to `Addmod_solocraft_masterScripts()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/server/apps/CMakeFiles/worldserver.dir/build.make:175: src/server/apps/worldserver] Error 1
make[1]: *** [CMakeFiles/Makefile2:1086: src/server/apps/CMakeFiles/worldserver.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
and I am not capable of fixing it. Can anyone please help?
Remove _master from all module subdirectories.
You can avoid this error by using git clone or cloning the modules in general with a git interface, instead of downloading a .zip file.

undefined reference error while installing OpenCV not compiling

I tried to find the same case as mine, but I couldn't. Most of them here are about undefined reference error during compiling their own code, but in my case this error occurred while installing OpenCV.
I referred to this page :
http://milq.github.io/install-opencv-ubuntu-debian/
I use armv7l and debian-scratch 9.3.
I tried to install OpenCV 3.4.0
I have this error :
[ 31%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/akaze.cpp.o
//usr/lib/libgdal.so.20: undefined reference to `XML_SetUserData'
//usr/lib/libgdal.so.20: undefined reference to `XML_SetUnknownEncodingHandler'
//usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0: undefined reference to `FT_Set_Char_Size'
//usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: undefined reference to `glGenerateMipmap'
//usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: undefined reference to `glUniform2fv'
//usr/lib/arm-linux-gnueabihf/libbluray.so.1: undefined reference to `FT_GlyphSlot_Embolden'
...
//usr/lib/arm-linux-gnueabihf/libavcodec.so.57: undefined reference to `deflateReset'
/usr/bin/ld: ../../bin/opencv_annotation: hidden symbol `atexit' in /usr/lib/arm-linux-gnueabihf/libc_nonshared.a(atexit.oS) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:100: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
CMakeFiles/Makefile2:4690: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I found out it's from a linking library error, but as I'm a beginner of Linux, it couldn't help me.
I hope this question is clear.

libx264.so.146 not found while compiling C++ code or x264 itself

I just upgraded my system from Ubuntu 15.10 to Ubuntu 16.04 LTS. Now, for some reason my C++ project won't compile anymore. CLion keeps saying it's missing 'libx264.so.146 as you can see in the compile log:
/home/lorre851/CLion/bin/cmake/bin/cmake --build /home/lorre851/.CLion12/system/cmake/generated/ce7171e4/ce7171e4/Release --target main -- -j 8
[ 20%] Linking CXX executable build/main
/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so.57, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_open_146'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_close'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_bit_depth'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_headers'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_encode'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_reconfig'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_parse'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_profile'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_fastfirstpass'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_levels'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_picture_init'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default_preset'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_delayed_frames'
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:172: recipe for target 'build/main' failed
make[3]: *** [build/main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[2]: *** [CMakeFiles/main.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/main.dir/rule' failed
make[1]: *** [CMakeFiles/main.dir/rule] Error 2
Makefile:118: recipe for target 'main' failed
make: *** [main] Error 2
Most people seem to give 'reinstalling x264' as a solution. However, reinstalling x264 with the following commands leads to the same error while compiling x264 itself.
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_open_146'
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'x264' failed
make: *** [x264] Error 1
Does anyone have an idea how I could get around this?
Okay, after a day of trying to remove and recompile the liavcodec-dev library, without result, I decided to format the drive and reinstall Ubuntu from scratch.
Everything is working fine now.

Including c++ libraries (opencv) on remote build raspberry pi

I'm stuck trying to get some openCV code working on my raspberry pi. I'm almost certain the problem is caused by the linker not knowing where the openCV library files are but I'm unfamiliar with both Linux and Netbeans so I'm in a bit of a pickle!
So, in short, my set-up is: attempting to build my code to my raspberryPi via remote C++ build host (G++). I am writing my code in Netbeans.
The builds worked fine up until the point I wrote two new classes using the "opencv2/core/core.hpp"
Now, when I attempt to build, I get the following error/s:
Copying project files to /home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64 at pi#192.168.1.99
Building project files list...
Checking directory structure...
Checking previously uploaded files...
Checking links...
Uploading changed files:
Zipping 1 changed files...
Uploading zip to pi#192.168.1.99...
Unzipping changed files...
Checking exec permissions...
Uploading changed files finished successfully.
cd '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
/usr/bin/make -f Makefile CONF=Release
"/usr/bin/make" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
"/usr/bin/make" -f nbproject/Makefile-Release.mk IOTestBuild
make[2]: Entering directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
g++ -o IOTestBuild build/Release/GNU-Linux/CommsManager.o build/Release/GNU-Linux/ImageManager.o build/Release/GNU-Linux/Server.o build/Release/GNU-Linux/main.o -L../../opencv- -lwiringPi -opencv
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::getStoredImg()':
ImageManager.cpp:(.text+0xcc): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::ImageManager()':
ImageManager.cpp:(.text+0x134): undefined reference to `cv::VideoCapture::VideoCapture()'
ImageManager.cpp:(.text+0x1c0): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x288): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x2b8): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x2c0): undefined reference to `cv::VideoCapture::VideoCapture()'
ImageManager.cpp:(.text+0x32c): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x344): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
ImageManager.cpp:(.text+0x350): undefined reference to `cv::Ptr<CvCapture>::delete_obj()'
ImageManager.cpp:(.text+0x358): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x36c): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x388): undefined reference to `cv::VideoCapture::~VideoCapture()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::~ImageManager()':
ImageManager.cpp:(.text+0x3a0): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x404): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x414): undefined reference to `cv::Mat::deallocate()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::getRawImg(cv::Mat*)':
ImageManager.cpp:(.text+0x43c): undefined reference to `cv::VideoCapture::open(int)'
ImageManager.cpp:(.text+0x450): undefined reference to `cv::VideoCapture::operator>>(cv::Mat&)'
ImageManager.cpp:(.text+0x494): undefined reference to `cv::VideoCapture::release()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::updateFrame()':
ImageManager.cpp:(.text+0x5f0): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
ImageManager.cpp:(.text+0x67c): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x6b8): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x6c4): undefined reference to `cv::Mat::deallocate()'
build/Release/GNU-Linux/ImageManager.o: In function `cv::Mat::~Mat()':
ImageManager.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x68): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x74): undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Release.mk:65: recipe for target 'IOTestBuild' failed
make[2]: *** [IOTestBuild] Error 1
make[2]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
nbproject/Makefile-Release.mk:62: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 701ms)
Any ideas?
I'm sure I just need to point the linker to the appropriate libs but I've no idea how to specify that relative path when using a build host.
Regards
Guy

undefined reference when the reference is in the header, and should exist

nachos
exception.o: In function `Exec(char*)':
/home/linux/ieng6/cs120f/cs120fbh/nachos/code/code/userprog/../userprog/exception.cc:223: undefined reference to `ProcessTable::Alloc(void*)'
progtest.o: In function `StartProcess(char*)':
/home/linux/ieng6/cs120f/cs120fbh/nachos/code/code/userprog/../userprog/progtest.cc:32: undefined reference to `ProcessTable::ProcessTable(int)'
/home/linux/ieng6/cs120f/cs120fbh/nachos/code/code/userprog/../userprog/progtest.cc:42: undefined reference to `ProcessTable::Alloc(void*)'
collect2: error: ld returned 1 exit status
make[1]: *** [nachos] Error 1
make: *** [all] Error 2
I have the code in this gist
https://gist.github.com/hassanshaikley/0721dd9f791a94629bfc
this error is strange because I include the necessary components. : (
you need to use the following options in the compiler:
-L to include your library search path
-l to add the particular libraries that need to be included