Skip to content

Can not link shared library #214

@mehdiBabamehdi

Description

@mehdiBabamehdi

I tried to installed clSPARSE library on Ubuntu 14.04, and I did the following steps

cd src 
mkdir build 
cd build 
cmake .. 
make

and in dir build/library libclSPARSE.so was generated and I added the address to $LD_LIBRARY_PATH, but when I compile a code in which I include clSPARSE.h I got the error 'clSPARSE.h' can not be found Since it was installed locally I can not use ldconfig -p | grep 'libclSPARSE' to check if it is installed on the machine. Is there any way I can find out if it was installed and can be linked correctly?
The makefile I used is

CXX = g++-9

FLAGS = -Wall -pedantic

INCLUDE = /usr/local/cuda-7.5/include

LFLAGS = /usr/local/cuda-7.5/lib

INCLUDESPARSE = /home/mehdi/clSPARSE/src/library/include

LFLAGSSPARSE = /home/mehdi/clSPARSE/src/build/library


LIBS = -lOpenCL -lclBLAS -I$(INCLUDESPARSE) -L$(LFLAGSSPARSE) -lclSPARSE -lm

TARGETDIR = ../exe/
TARGET= spmv
SRC = $(TARGET).cc

.PHONY: all, clean

all: $(TARGET)

$(TARGET):$(SRC)
        $(CXX) $(STD) $(FLAGS) $< -I$(INCLUDE) -L$(LFLAGS) $(LIBS) -o $(TARGETDIR)$@

clean:
        rm -rf $(TARGETDIR)$(TARGET) *.o
```
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions