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.

Steven

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

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)

project (test)

find_package(CUDA REQUIRED)

cuda_add_library(mylib source1.cu source2.cu source3.cu source4.cc ....)

add_executable(myexe source5.cc source6.cc source7.cc ...)

target_link_libraries(myexe mylib ${CUDA_LIBRARIES}