create an .os library

Hi all,
I have done a module of a large application in cuda c and I wanted to integrate it with the larger project in c.
unfortunately I am not able to effectively create a library to do so. I always get an error during the linking.

Has anybody successfully done so already?

does anybody know a method do do so or a tutorial to follow?

thanks for any help.


Your question is very vague and my crystal ball is broken. What exactly is the linker error you are getting? If we knew what that was, we could possibly help.

If you want a tutorial, here is a 6-line one using CMake and FindCUDA


project (test)

find_package(CUDA REQUIRED)

cuda_add_library(mylib ....)

add_executable(myexe ...)

target_link_libraries(myexe mylib ${CUDA_LIBRARIES}