unix_5.11/lib/libqwt.so: file format not recognized; treating as linker script - ubuntu-16.04

i am using qt 5.11.1 with GCC compiler in ubuntu 16.04 LTS
i am trying to run a qt application and i am facing the following error
unix_5.11/lib/libqwt.so: file format not recognized; treating as linker script
Any guidance is greatly appreciated.
Thanks,

Related

Configure mex in MATLAB 2018a Ubuntu 16.04

I have upgrade to MATLAB R2018a on my machine with Ubuntu 16.04.
Before this new install I was able to compile MEX-files on MATLAB R2017a. But now I got an error:
Error using mex
/home/solrad/.matlab/R2018a/mex_C_glnxa64.xml not found; check that you are in the correct current folder, and check the
spelling of '/home/solrad/.matlab/R2018a/mex_C_glnxa64.xml'.
I have checked for the file on /home/solrad/.matlab/R2018a/mex_C_glnxa64.xml and the file is there.
How can I fix it so the mex command works again?

How to run GNAT Programming Studio on Raspberry PI 3 (Raspbian)?

I can not run GNAT Programming Studio on Raspberry PI 3 (Raspbian).
I am using 2017-06-21-raspbian-jessie.img and gnat-gpl-2016-raspberrypi-linux-linux-bin.tar.gz
After unzipping and typing in terminal sudo ./doinstall it is installed in /usr/gnat. Then I get a message saying
GNAT GPL is now installed. To luanch it, you must put /usr/gnat/bin in front of your PATH enviroment variable.
Then I type in terminal PATH="/usr/gnat/bin:$PATH"; export PATH.
Then I type in terminal gps after that I get
/usr/gnat/bin/gps_exe: 1: /usr/gnat/bin/gps_exe: Syntax error: word unexpected (expecting ")")
I have tried executing executable in /usr/gnat/bin but then I get
/usr/gnat/bin/gps_exe: cannot execute binary file: Exec format error
How to install it properly and be able to run it?
You need to install it on an x86 computer.
From the README:
The GNAT GPL compiler for raspberrypi is a cross compiler, hosted on
linux-x86 (or linux-x86_64)

How do I set up SDL with Codeblocks on Raspbian

I have a program I wrote in windows using the SDL library that I would like to compile for Raspbian. I installed CodeBlocks on the Raspbian and followed these instructions to set up SDL: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/
I get the following error:
g++ -LC:/SDL/lib -o bin/Debug/SDL_menu obj/Debug/main.o
obj/Debug/menu.o -lmingw32 -lSDL2main -lSDL2
obj/Debug/menu.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
I later tried this tutorial (which actually matches the version of SDL I am using, although I used the previous tutorial to get it to work on Windows): http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/codeblocks/index.php
And I get the error:
ld||cannot find -lSDL2|
I have very little experience with Raspbian or Linux which is probably why this is so difficult.
What can I do to get this set up?
You need to install all SDL2-dev packages.
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev
The include folder will probably be /usr/include/SDL2.
And by inspecting your build command, you're trying to pass Windows style path on a Unix machine, that doesn't end well for sure. Don't link with mingw32 if you're not using Mingw32 compiler, and you should only link against mingw32 on Windows as well.

"C++ compiler works....no" when compiling mongo-cxx-driver legacy using scons

I'm getting a C++ compiler works....no error when compiling the CPP legacy driver.
I'm compiling with:
scons --64 --cxx=/usr/local/bin/gcc -cc=/usr/local/bin/gcc --prefix=/opt/mongo install
The config.log states:
libmpc.so.2 cannot open shared object file
libmpc.so.2 does exists in /usr/local/lib which is in LD_LIBRARY_PATH
When I execute the compilation command for conftest_o.cpp file, from the config.log it compiles with no issues.
~/.bashrc and ~/.bash_profile seems fine.
OS: RedHat 6.6 64bit
GCC: 4.9.2
mongodb CPP legacy driver version: 1.0.5
Boost : 1.57
Python: 2.6.6
scons: 2.3.6
Thanks for your help.
Update : solved the problem using
--propagate-shell-environment flag when running scons.
Apparently scons does not pass shell environment variables to child processes.
Thanks for your help

Error when trying to use mexopencv in matlab

I am trying to use mexopencv on my system which has:
Ubuntu 12.04.1 LTS
opencv 2.4.2
gcc-4.4
matlab 2012
and they all are working. I also used some c++ codes to test mex and it worked fine.
I used this to install mexopencv. Also did this because of some error I got which mentioned libstdc++.so.6
Now when I try something like:
a = cv.imread('pic.jpg');
I get:
Error using cv.imread
Invalid MEX-file '/home/primepc09/mexopencv/+cv/imread.mexa64': /usr/local/lib/libopencv_highgui.so.2.4:
undefined symbol: _ZNK9QCheckBox15minimumSizeHintEv
Any idea why I get this?
This is an unresolved symbol from QT library. Make sure you have QT installed on your system:
sudo dpkg -l | grep libqt
If you don't have it, you need to install it.