我正在使用以下makefile
SHELL = /bin/sh
CXXFLAGS += -fPIC
TARGET = product_bridge.so
MYPRODUCT = /tmp/product
JAVASDK = /x86.linux/include/
CXXFLAGS += -I$(JAVASDK) -I$(JAVASDK)/linux -I$(GFCPP)/include -Wl,-rpath, -L$(MYPRODUCT)/lib -lmyproduct
SOURCES = $(shell echo *.cpp)
HEADERS = $(shell echo *.h)
OBJECTS = $(SOURCES:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CXX) -shared $(CXXFLAGS) -o $(TARGET) $(OBJECTS)
clean:
rm -rf *.so *.o
当我在ubuntu
上构建此内容时,我在myproduct
中看不到ldd
。但是我在RHEL
myproduct
<{1}} ldd
看到了同样的情况
我的共享库,product_bridge.so
构建于RHEL