0

I'm having problem reported as below while trying to execute it. Where should I go to let it know where to find the .so lib which is under ${HOME}/projects/OpenImageIO/dist/linux64/lib?

Starting: /home/chaoren/Dropbox/hw2/hw2_3 /home/chaoren/Dropbox/hw2/hw2_3: error while loading shared libraries: libOpenImageIO.so.1.2: cannot open shared object file: No such file or directory

I built this project by importing my Makefile

OFILES = Matrix.o LinearAlgebra.o PerlinNoise.o Camera.o OIIOFiles.o Image.o Utilities.o Grid.o SparceGrid.o VolumeOperations.o Ray.o Face.o Line.o Lights.o Group.o PolySurf.o File.o OBJFile.o Vector.o

AFILES = $(OFILES)

ROOTDIR = .

LIB = $(ROOTDIR)/libVR.a

LINKS =  Magick++-config  --cppflags --cxxflags --ldflags --libs -lm -lOpenImageIO -L/usr/local/lib -L${HOME}/projects/OpenImageIO/dist/linux64/lib

INCLUDES = Magick++-config  --cppflags --cxxflags -I${HOME}/projects/OpenImageIO/dist/linux64/include

CXX = g++ -Wall -g -O2 -D_THREAD_SAFE -pthread -fopenmp

.C.o:
    $(CXX) -c $(INCLUDES) $<

all: $(AFILES)
    ar rv $(LIB) $?

hw2_1:  hw2_1.C
    $(CXX) hw2_1.C $(INCLUDES) $(LIB) $(LINKS) -o hw2_1

hw2_2:  hw2_2.C
    $(CXX) hw2_2.C $(INCLUDES) $(LIB) $(LINKS) -o hw2_2

hw2_3:  hw2_3.C
    $(CXX) hw2_3.C $(INCLUDES) $(LIB) $(LINKS) -o hw2_3

noiseimage:  noiseimage.C
    $(CXX) noiseimage.C $(INCLUDES) $(LIB) $(LINKS) -o noiseimage

clean:
    rm -f *.o *.gch core $(LIB) vr vrppm *~ vRender hw2_1 hw_2 hw2_3
4

1 回答 1

0

KDevelop4 使用 CMake 作为其默认构建系统。在 CMake 中,所有库和其他程序元素都在特殊文件 (CMakeLists.txt) 中标识。然后,该文件成为实际构建可执行文件的 make 文件的基础。

于 2013-03-21T15:06:21.720 回答