I just installed QT Creator 2.7.0 [Based on Qt 5.0.1 (64 bit)] on my Ubuntu 13.04 end. I tried creating a sample HTML5 Application and when I try to run it, some issues are encountered. Here's the output of the build process.
23:16:22: Starting: "/usr/bin/qmake" /home/res/Git/test/first/first.pro -r -spec linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
23:16:22: The process "/usr/bin/qmake" exited normally.
23:16:22: Starting: "/usr/bin/make"
make: Circular all <- first dependency dropped.
Copying application data...
g++ -m64 -o first main.o html5applicationviewer.o moc_html5applicationviewer.o -L/usr/X11R6/lib64 -lQt5WebKitWidgets -lX11 -lxslt -lrt -lgio-2.0 -lgstapp-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -pthread -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -lsqlite3 -L/build/buildd/qtdeclarative-opensource-src-5.0.1/lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu/x86_64-linux-gnu -L/build/buildd/qtwebkit-opensource-src-5.0.1/lib -lQt5Sql -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5WebKit -lQt5Qml -lQt5Location -lQt5Widgets -lQt5Network -lQt5Sensors -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lxslt
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lgstapp-0.10
/usr/bin/ld: cannot find -lgstinterfaces-0.10
/usr/bin/ld: cannot find -lgstpbutils-0.10
/usr/bin/ld: cannot find -lgstvideo-0.10
/usr/bin/ld: cannot find -lgstbase-0.10
/usr/bin/ld: cannot find -lgstreamer-0.10
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
make: *** [first] Error 1
23:16:22: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project first (kit: Desktop)
When executing step 'Make'
23:16:22: Elapsed time: 00:00.
This is the first time I'm trying this HTML5 application in QT Creator.
How can this issue be solved?
For each library, check if you've installed appropriate *-dev package. E.g for message /usr/bin/ld: cannot find -lxslt check package libxslt1-dev
Related
I am using a header file named OlcPixelGameEngine, and one more header file, but when I run the compile command, I get a big error.
This is the command to compile the cpp program.
g++ main.cpp -o main -luser32 -lgdi32 -lopengl32 -lgdiplus -lShlwapi -lstdc++fs -static -std=c++17 -lxinput9_1_0 -lole32 -loleaut32 -ldinput8 -ldxguid -ldwmapi
and this is the error:-
/usr/bin/ld: cannot find -luser32
/usr/bin/ld: cannot find -lgdi32
/usr/bin/ld: cannot find -lopengl32
/usr/bin/ld: cannot find -lgdiplus
/usr/bin/ld: cannot find -lShlwapi
/usr/bin/ld: cannot find -lxinput9_1_0
/usr/bin/ld: cannot find -lole32
/usr/bin/ld: cannot find -loleaut32
/usr/bin/ld: cannot find -ldinput8
/usr/bin/ld: cannot find -ldxguid
/usr/bin/ld: cannot find -ldwmapi
collect2: error: ld returned 1 exit status
I am using Linux, Ubuntu 20.04.
I tried to build a source file with following command:
g++ main.cpp `wx-config --cxxflags --libs std`
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lX11
/usr/bin/ld: cannot find -lXxf86vm
/usr/bin/ld: cannot find -lSM
/usr/bin/ld: cannot find -lgtk-3
/usr/bin/ld: cannot find -lgdk-3
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lpangocairo-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lcairo-gobject
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -lcairo
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lpng
/usr/bin/ld: cannot find -lexpat
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
I guess I didn't install wxWidgets correctly (I installed libwxgtk3.0-dev as described in multiple install tutorials)
EDIT
wx-config --libs std
-L/usr/local/lib -pthread /usr/local/lib/libwx_gtk3u_xrc-3.1.a /usr/local/lib/libwx_gtk3u_qa-3.1.a /usr/local/lib/libwx_baseu_net-3.1.a /usr/local/lib/libwx_gtk3u_html-3.1.a /usr/local/lib/libwx_gtk3u_adv-3.1.a /usr/local/lib/libwx_gtk3u_core-3.1.a /usr/local/lib/libwx_baseu_xml-3.1.a /usr/local/lib/libwx_baseu-3.1.a -pthread -lgthread-2.0 -lX11 -lXxf86vm -lSM -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lpng -lexpat -lwxregexu-3.1 -lwxtiff-3.1 -lwxjpeg-3.1 -lz -ldl -lm
If you use Ubuntu, you really shouldn't have any problems if you just installed the distribution package.
It looks like you had tried to install wxWidgets from sources before and your wx-config comes from /usr/local/bin and is not the one installed by the package. You can check it using which wx-config and/or using full path to /usr/bin/wx-config when compiling. Just get rid of this one, and all the other traces of wxWidgets under /usr/local, if you're using the system packages.
I'm getting following errors after running make command:
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -laio
/usr/bin/ld: cannot find -lcurl
/usr/bin/ld: cannot find -lssh2
/usr/bin/ld: cannot find -lncursesw
/usr/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status
main/CMakeFiles/esesc.dir/build.make:163: recipe for target 'main/esesc' failed
make[2]: *** [main/esesc] Error 1
CMakeFiles/Makefile2:1041: recipe for target 'main/CMakeFiles/esesc.dir/all' failed
make[1]: *** [main/CMakeFiles/esesc.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
I have tried to search online in these links:
ld cannot find an existing library
usr/bin/ld: cannot find -l<nameOfTheLibrary>
Here I see that every library has to be linked symbolically with the existing library but I'm unsure of doing that. Can anyone please suggest me any technique for doing this?
I know locate <library> and ln commands. Now how to eliminate the above errors using this? Can anyone please elaborate on this? Thanks in advance.
it means you didn't install needed dependencies.
did you install at least libs from this manual? https://github.com/masc-ucsc/esesc/blob/master/docs/Usage.md
sudo apt-get install libepoxy0 libepoxy-dev
should remove epoxy warning, for example
Your link command probably needs a -L to precede those -l.
Search your system for those libnames, for example GLESv2.
I use "locate GLESv2". (Note: locate uses what "sudo updatedb" updates)
On my Unbuntu, the following lines are reported by locate.
> /usr/lib/x86_64-linux-gnu/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2.0.0
For the so (the shared object library) found in the first dir, you might try adding the following to your build command.
-L/usr/lib/x86_64-linux-gnu
And repeat for any library name not yet resolved.
Here is an example from my Makefile - note the relative path to a collection of libraries I wrote in a directory "bag"
R01: dtb_acs.cc
rm -f dtb_acs
g++ -m64 -O3 -ggdb -std=c++14 -Wall-Wextra -Wshadow -Wnon-virtual-dtor
-pedantic -Wcast-align -Wcast-qual -Wconversion -Wpointer-arith -Wunused
-Woverloaded-virtual
-O0 dtb_acs.cc -o dtb_acs
-L../../bag -lbag_i686 -lposix_i686 -lrt -pthread
^^^^^^^^^^^ three -l<libname> are in the -L dir
If needed (because the effort did not resolve anything), try adding -l and a specific library, such as -llibGLESv2.so (or .a, as the case may be)
Good luck.
I'm trying to build fsthost on 64-bit Debian Stable and the last (linking) step fails:
m#debian:~/Downloads/fsthost-1.5.4$ make
winegcc -m32 -o fsthost32 amc_32.o jackamc_32.o fst_32.o gtk_32.o jackvst_32.o \
jfst_32.o fxb_32.o fps_32.o vstwin_32.o cpuusage_32.o info_32.o \
midifilter_32.o list_32.o -m32 -mwindows -L/usr/lib/i386-linux-gnu/wine \
-lpthread -lX11 -ljack -lxml2 -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 \
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo \
-lgobject-2.0 -lglib-2.0
/usr/bin/ld: cannot find -lX11
/usr/bin/ld: cannot find -ljack
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lgtk-3
/usr/bin/ld: cannot find -lgdk-3
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lpangocairo-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lcairo-gobject
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -lcairo
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
winegcc: gcc failed
make: *** [fsthost32] Error 2
m#debian:~/Downloads/fsthost-1.5.4$
Notice, that winegcc is being used here, not gcc.
So, ld claims there's no libX11.so, let's check it:
m#debian:~$ locate libX11.so
/usr/lib/i386-linux-gnu/libX11.so.6
/usr/lib/i386-linux-gnu/libX11.so.6.3.0
/usr/lib/x86_64-linux-gnu/libX11.so
/usr/lib/x86_64-linux-gnu/libX11.so.6
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
m#debian:~$
Bingo! There's no /usr/lib/***i386***-linux-gnu/libX11.***so***! When I manually add a symlink from /usr/lib/i386-linux-gnu/libX11.so to /usr/lib/i386-linux-gnu/libX11.so.6, the line:
/usr/bin/ld: cannot find -lX11
obviously disappears from ld's output.
Why are there no *.so symlinks in i386-linux-gnu directory and how should I proceed from here?
If you have the shared libraries but are missing the *.so symlinks that seems to indicate that you have installed the runtime library package but not the dev library package. What was the name of the package that you installed to create the i386-linux-gnu directory? I'd search for related packages that have 'dev' or similar in the name and try installing them.
Just a guess here, but the package you may be missing is ia32-libs-dev
this is maybe a noob question but I've been stuck for a while and I appreciate any help...
I have been able to install opencv and run a sample application using the terminal without any problems however I want to use eclipse to manage my project easily...
I have followed the instructions given by the opencv tutorial in this [link]
http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html
I followed everything and i still get the following errors
/usr/bin/ld: cannot find -llibopencv_calib3d
/usr/bin/ld: cannot find -llibopencv_contrib
/usr/bin/ld: cannot find -llibopencv_core
/usr/bin/ld: cannot find -llibopencv_features2d
/usr/bin/ld: cannot find -llibopencv_flann
/usr/bin/ld: cannot find -llibopencv_gpu
/usr/bin/ld: cannot find -llibopencv_highgui
/usr/bin/ld: cannot find -llibopencv_imgproc
/usr/bin/ld: cannot find -llibopencv_legacy
/usr/bin/ld: cannot find -llibopencv_ml
/usr/bin/ld: cannot find -llibopencv_nonfree
/usr/bin/ld: cannot find -llibopencv_objdetect
/usr/bin/ld: cannot find -llibopencv_photo
/usr/bin/ld: cannot find -llibopencv_stitching
/usr/bin/ld: cannot find -llibopencv_superres
/usr/bin/ld: cannot find -llibopencv_ts
/usr/bin/ld: cannot find -llibopencv_video
/usr/bin/ld: cannot find -llibopencv_videostab
collect2: error: ld returned 1 exit status
make: *** [Test_OpenCV01] Error 1
the only differences I was able to find between my steps and the tutorial is:
when i run the command :
pkg-config --libs opencv
this is my output
/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so
so the library names are a bit different so I use the names that I have.
the command line that was executed automaticly from eclipse is
g++ -L/usr/local/lib/ -o "Test_OpenCV01" ./src/main.o -llibopencv_calib3d -llibopencv_contrib -llibopencv_core -llibopencv_features2d -llibopencv_flann -llibopencv_gpu -llibopencv_highgui -llibopencv_imgproc -llibopencv_legacy -llibopencv_ml -llibopencv_nonfree -llibopencv_objdetect -llibopencv_photo -llibopencv_stitching -llibopencv_superres -llibopencv_ts -llibopencv_video -llibopencv_videostab
it clearly specifies that the library path is /usr/local/lib/ which is where the shared libraries are at however in the error it says that it can't find the lib files in /usr/bin/ld
p.s.
I have tried both
1)Configuring OpenCV for using shared libraries:
sudo gedit /etc/ld.so.conf.d/opencv.conf
and adding the following line at the end of the file
/usr/local/lib the running sudo ldconfig after saving.
2)run the command
export LD_LIBRARY_PATH=/usr/local/lib
I also added
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
to the end of the /etc/bash.bashrc file.
Thanks for your help in advanced.
Your linking step is specifying the libraries incorrectly. If the library is libfoo.so, then you need to say -lfoo.
Replace
g++ -L/usr/local/lib/ -o "Test_OpenCV01" ./src/main.o -llibopencv_calib3d -llibopencv_contrib -llibopencv_core -llibopencv_features2d -llibopencv_flann -llibopencv_gpu -llibopencv_highgui -llibopencv_imgproc -llibopencv_legacy -llibopencv_ml -llibopencv_nonfree -llibopencv_objdetect -llibopencv_photo -llibopencv_stitching -llibopencv_superres -llibopencv_ts -llibopencv_video -llibopencv_videostab
with
g++ -L/usr/local/lib/ -o "Test_OpenCV01" ./src/main.o -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab
You can read more about linking options here.
Even though the file names are like liblibopencv_core.so under /usr/local/lib folder, in GCC C++ linker libraries just mention opencv_core. Do the same for other files you are adding in library.