I try to learn how to use realityGrid so I use cmake to build some samples. After finishing use ccmake command, I tried to use make command. But I'm keeping to get the errors:
/usr/bin/ld: cannot find -lvtkCommon
/usr/bin/ld: cannot find -lvtkFiltering
/usr/bin/ld: cannot find -lvtkGraphics
/usr/bin/ld: cannot find -lvtkImaging
/usr/bin/ld: cannot find -lvtkIO
/usr/bin/ld: cannot find -lvtkRendering
I found the libvtkCommon.a in /usr/lib/vtk-5.10. What should I do? Thanks ahead.
you should install the package containing the "vtk" libraries so ld can find them.
if you installed them manually you need to add the path at which those files are located to the library path configuration.
http://blog.andrewbeacock.com/2007/10/how-to-add-shared-libraries-to-linuxs.html
You need to tell CMake that you require the VTK module. I haven't used CMake much, but I believe the line you need is something like:
find_package(VTK REQUIRED NO_MODULE)
include(${VTK_USE_FILE})
If that doesn't work, you could probably fall back to something like this:
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /usr/lib/vtk-5.10)
The bad part about the last line is that it won't port well to other environments where the version is slightly different.
Related
I've installed libcrypto++-dev and crypto1 besides their 32-bit versions ( since I think the program I'm trying to compile needs them). But still I get the following error :
/usr/bin/ld: Cannot find -lcrypto
Any suggestions ?
I use ubuntu 18.04
The linker would be unable to find something like libcrypto.so.1 based on the combo of default/configured and arg-based set of directories to search.
Most likely your lib resides in a dir outside of the linker's default list.
After identifying the lib install dir, replace /usr/local/lib64 within this example:
gcc <list-of-objects> -o xyz -L/usr/local/lib64 -lcrypto
Please help me about problems when i try build Skia by this guide
It said that:
/usr/bin/ld: cannot find -lfreetype
/usr/bin/ld: cannot find -lfontconfig
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGLU
/usr/bin/ld: cannot find -lX11
Thank's so much!
/usr/bin/ld is the linker: it links the program you are trying to compile with existing libraries. In your case, those libraries will be files named libfreetype.so, libfontconfig.so, and so on.
The problem in your case is probably those libraries don't exist on your system. So you must install them. The process for doing so varies depending on which version of Linux you are running.
On a Redhat, CentOS or Fedora based system, the process would be to do something like
yum -y install "*freetype*"
Look at the output of 'yum list' to find the exact name. If you're on another type of Linux, perhaps someone else can help.
I read Setting Up An Application - NetBeans - Linux in Ogre tutorials. But this instructs to build the project separately on console using make && make install. It seems Netbeans is only used as a editor. Is there a way to I do everything using Netbeans?
I tried to setup Netbeans to use OGRE libraries, but it was not successful. I get some errors when I build the project. This is what I did so far.
Project properties > C++ Compiler : Include Directories
/usr/include/OGRE:/usr/include/OIS:/usr/include
In Linker : I added all the
libogre*.so files in /usr/lib as
Libraries.
I used apt-get to install OGRE
pkg-config --libs OGRE
-lOgreMain -lpthread
pkg-config --cflags OGRE
-pthread -I/usr/include/OGRE
This link only provides details for doing this on windows.
Could someone tell me how to setup Netbeans for OGRE correctly on Linux
UPDATE
The console output
g++ -o dist/Debug/GNU-Linux-x86/carrace build/Debug/GNU-Linux-x86/TutorialApplication.o build/Debug/GNU-Linux-x86/BaseApplication.o -L/usr/bin -lPlugin_BSPSceneManager -lPlugin_CgProgramManager -lPlugin_OctreeSceneManager -lPlugin_OctreeZone -lPlugin_ParticleFX -lPlugin_PCZSceneManager -lRenderSystem_GL -lOgreMain -lOgrePaging -lOgreProperty -lOgreRTShaderSystem -lOgreTerrain -lOIS-1.3.0 -lOIS -lboost_date_time-mt -lboost_date_time -lboost_serialization-mt -lboost_serialization -lboost_thread-mt -lboost_thread -lboost_wserialization-mt -lboost_wserialization
/usr/bin/ld: cannot find -lPlugin_BSPSceneManager
/usr/bin/ld: cannot find -lPlugin_CgProgramManager
/usr/bin/ld: cannot find -lPlugin_OctreeSceneManager
/usr/bin/ld: cannot find -lPlugin_OctreeZone
/usr/bin/ld: cannot find -lPlugin_ParticleFX
/usr/bin/ld: cannot find -lPlugin_PCZSceneManager
/usr/bin/ld: cannot find -lRenderSystem_GL
I tried adding these folders separately but it didn't work.
Thank you in advance.
For me it worked with
-lOgreMain -lOgreTerrain -lOIS -lpthread
as linker options
and the same includes as you have
You forgot pkg-config --ldflags OGRE
You can see my tutorial in here http://arief-rublog.blogspot.com/2011/09/cara-pengaturan-ogre-dengan-ide.html , but my tutorial in Bahasa Indonesia, may be you can use google translate to translate it. i hope my tutorial is useful for you.
I'm running on 64-bit Ubuntu, and trying to get DMD v2.052 to work with Code::Blocks. The problem is, Code::Blocks does compiling and linking in two separate steps, and I can't seem to get around that. My compiler flags (for this project) are -m64, and my linker flags are all the ones supplied in dmd.conf. However, I get errors when I try to do this, like
Linking console executable: bin/Debug/Gossamer
/usr/bin/ld: skipping incompatible /home/me/devl/sfml2/bindings/d/lib/libdsfml-system.a when searching for -ldsfml-system
/usr/bin/ld: cannot find -ldsfml-system
/usr/bin/ld: skipping incompatible /home/me/devl/sfml2/bindings/d/lib/libdsfml-graphics.a when searching for -ldsfml-graphics
/usr/bin/ld: cannot find -ldsfml-graphics
/usr/bin/ld: skipping incompatible /home/me/devl/sfml2/bindings/d/lib/libdsfml-audio.a when searching for -ldsfml-audio
/usr/bin/ld: cannot find -ldsfml-audio
/usr/bin/ld: skipping incompatible /home/me/devl/sfml2/bindings/d/lib/libdsfml-window.a when searching for -ldsfml-window
/usr/bin/ld: cannot find -ldsfml-window
collect2: ld returned 1 exit status
I compiled the DSFML libs myself, using dmd -m64 -lib [library source code files], and there it wasn't in two steps, so I know they're fine. It seems ld doesn't like them, for some reason. Can somebody help?
Try doing the compile from the command line using just DMD. If that works I think there is a flag that will cause DMD to print the command line for the link command. From that you should be able to tell what you need Code::Blocks to do differently.
I have downloaded the latest GLUI source code and now I am trying to compile it. When I do so, I get the following error:
g++ -O0 -Wall -pedantic -I./ -I./include -I/usr/X11R6/include -o bin/example1 example/example1.cpp -L./lib -lglui -L/usr/X11R6/lib/libXdmcp.a -lglut -lGLU -lGL -lXmu -lXext -lX11 -lXi -lm
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
When I did a locate libXmu, I get the following output:
> %:~/src/GLUI/src$ locate libXmu
> /usr/lib/libXmu.so.6
> /usr/lib/libXmu.so.6.2.0
> /usr/lib/libXmuu.so.1
> /usr/lib/libXmuu.so.1.0.0
Do I get the error because I don't have a /usr/lib/libXmu.so? If this is the case, how can I make one? (I am not experienced with linking at all).
Thanks!
Linux distributions usually package the libraries needed for running programs separately from the files needed to build programs.
Look for packages named *-devel or *-dev.
I don't know which one you need in particular for this, but you can use apt-cache search to look for it.
The answer was actually one of the first ones here originally but the owner deleted it, it seems. I was able to solve the problem by creating a symbolic link to the latest version of the library (i.e. /usr/lib/libXmu.so.6) and compile the code successfully.
I had the same problem, if creating a symbolic link doesnt help,
try the following:
Print your $PATH ("echo $PATH"),
and check if the library file you need is in one of those directories.
Use "export PATH=/newly/added/path:$PATH" to add new directory to check.
Ive been including libevent, added "-levent" in the gcc command, and ld used file /usr/lib/libevent.so, so it looks like the "lib" prefix and extension are being added automatically by ld.
Keep it up.