Generated .exe does not work


I’m trying to improve a project (written on c) by adding some CUDA working. I’d installed VisualStudio 2019 and CUDA, both of them are working well.

So, I recompiled my source code (I write it on an old machine) and works well (let’s say as expected) when compiled using VistualStudio.

But when I use “nvcc” my program does not work.

I have 2 “.c” files with respective “.h” files.

functions.c / functions.h
code.c / code.h

I use the following commands

nvcc functions.c -lib -o functions.lib -include functions.h
nvcc code.c -lfunctions -o code.exe -include code.h

It compile with no errors nor warnings, but when I execute it, it suddently stops…

I don’t know if there’s some step I’m missing, or maybe there’s some tools available to look further on my error…

May someone please help me?