Qt IDE run error: cannot open .so file but running from terminal it is fine - qt

I wrote a simple code to test CUDA with Qt on Linux Ubuntu.
While running app within Qt IDE I get the following error:
However while running app from command line I don't get any erorr and all computation done by CUDA are correct.
Also while running CUDA samples from command line, everything is okay.
Also all paths in Qt .pro file are set correctly
So the question is why Qt IDE prompts me with above error?

Ok, problem fixed.
Turns out that LD_LIBRARY_PATH does not do its job.
What I did instead was:
add this
/usr/local/cuda-7.0/lib64
to
/etc/ld/so/conf
file
Run
sudo ldconfig
I hope it will help somone

Related

Bad EXE format when running an .exe with wine64 [duplicate]

I'm trying to generate an executable from Linux for Windows using pyinstaller.
pyinstaller --onefile --windowed montecarlo.py
I run this command and get a single executable that works on Linux just fine, but if I try on Windows, it's just a simple file. Why?
I was trying to do this same thing today and ran across this answer. It pointed to the FAQ, which says cross-compiling is not supported. It recommends using Wine.

I can not call riscv64-unknown-elf-gcc in archlinux

After installed the toolchain of xv6 needed on archlinux, following Tools Used in 6.S081 , I run the riscv64-unknown-elf-gcc --version, but my command line shows zsh: command not found: riscv64-unknown-elf-gcc, how can I do next?
In my archlinux, use the riscv64-linux-gnu-gcc command to compile, in macOS I use riscv64-unknown-elf-gcc, maybe try the first one, Or try typing risc and then pressing the tab key, maybe the shell will help you complete the rest of the command

Build a QT program from command line

I know this question has already been asked, but I encounter an issue that I haven't seen elsewhere.
I am trying to build automatically a QT program on Jenkins through a JenkinsFile.
So I want to build this program in command line.
On Qt Creator, everything works fine, my makefile is generated and the program compiles.
But when I manually type the exact commands that are executed in Qt on a terminal (cmd and cygwin), the compilation fails.
The errors are usually ld: cannot find -lXXXXXX
My guess is that it is an environment problem so I tried to add some lib paths in the $PATH, $LIBRARY_PATH, and $LD_LIBRARY_PATH variables but it doesn't resolve the problem. The error just becomes Undefined reference to ___XXXXXX
I would appreciate some help on this issue !
Thanks.
EDIT
The building (slave) machine is a windows 7. Here is a screenshot of the compilation stage in Qt (which works fine). The commands I try to type in a terminal are exactly the same as the blue lines on the screenshot. (sorry some lines are written in French)
From the error message ld: cannot find -lXXXXXX and the environment variables, I would suppose that you are compiling in Linux/Unix. Now, if you are compiling with g++, the environment variables $PATH, $LIBRARY_PATH, and $LD_LIBRARY_PATH won't have any effect on finding libraries. What you may try is an -L argument to the compiler telling it where the library is located, I mean:
g++ -L /path/to/libXXXXX.so -l XXXXX -o result source.cpp

Robot Framework AutoitLibrary run command does not fail but does not open the application

I am having an issue that notepad.exe is not getting opened. The run command itself is successful according to the log. But Nothing is opening. I have just installed AutoItLibrary with pip and downloaded and installed Autoit on my machine. My path is only to Python and Python Scripts directory. I have no other components running. Do I have to have any other thing done? have the code Library|AutoitLibrary |Run|notepad.exe |Send|'abc' Send fails saying no such keyword found. I do not see the notepad opening at any point. I also tried wait for the window where it just waits until time out and comes out without the notepad getting opened.
Got it figured out. A Pip install is not doing the full job. I had to download the distro zip file and run the setup install.

Cygwin error message -- binary file not executable

So I am trying to install a program on my windows machine that required me to install Cygwin to install it. So I am working from a README file and assueme I have compiled the code previously correctly (its one line sh build.sh) and when actually trying to use the program I get the following error:
BabakP#Babak /cygdrive/c/Users/BabakP/Desktop/test
$ ./Runlock input.tst output.tst 1
./Ostrich: Exec format error. Binary file not executable.
I guess I am trying to figure out why I am getting this error so any suggestions on how to troubleshoot it would be great!
./Ostrich is a Mac executable. It can't be executed under Cygwin. (A MacOS emulator that runs under Windows or Cygwin is theoretically possible, but I don't know of any such thing.)
Without knowing the details of the software you're trying to install, it's hard to say how or whether you can fix it.
You may be able to rebuild Ostrich from source (if you have the source, and if it's not MacOS-specfic).

Resources