Using GLFW library in a CUDA program

I am trying to execute the following code(sample_code.cu) on vscode -

#include <stdio.h>
#include <cuda_runtime.h>
#include "./include/GLFW/glfw3.h"

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

// CUDA kernel to fill the RGB buffer with values
__global__ void fillRGB(unsigned char *rgb) {
    int idx = blockIdx.x * blockDim.x + threadIdx.x;
    int offset = idx * 3;
    rgb[offset] = idx % 255;     // R value
    rgb[offset + 1] = (idx * 3) % 255; // G value
    rgb[offset + 2] = (idx * 7) % 255; // B value
}

int main(int argc, char **argv) {
    GLFWwindow* window;

    // Initialize GLFW
    if (!glfwInit()) {
        fprintf(stderr, "Failed to initialize GLFW\n");
        return -1;
    }

    // Create a windowed mode window and its OpenGL context
    window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Custom RGB Window", NULL, NULL);
    if (!window) {
        fprintf(stderr, "Failed to create GLFW window\n");
        glfwTerminate();
        return -1;
    }

    // Make the window's context current
    glfwMakeContextCurrent(window);

    // Allocate memory for RGB buffer on device
    unsigned char *dev_rgb;
    cudaMalloc((void**)&dev_rgb, WINDOW_WIDTH * WINDOW_HEIGHT * 3 * sizeof(unsigned char));

    // Fill RGB buffer with values using kernel
    int threadsPerBlock = 256;
    int blocksPerGrid = (WINDOW_WIDTH * WINDOW_HEIGHT + threadsPerBlock - 1) / threadsPerBlock;
    fillRGB<<<blocksPerGrid, threadsPerBlock>>>(dev_rgb);

    // Allocate memory for RGB buffer on host
    unsigned char *host_rgb = new unsigned char[WINDOW_WIDTH * WINDOW_HEIGHT * 3];

    // Copy RGB buffer from device to host
    cudaMemcpy(host_rgb, dev_rgb, WINDOW_WIDTH * WINDOW_HEIGHT * 3 * sizeof(unsigned char), cudaMemcpyDeviceToHost);

    // Loop until the user closes the window
    while (!glfwWindowShouldClose(window)) {
        // Render RGB buffer to window
        glClear(GL_COLOR_BUFFER_BIT);
        glDrawPixels(WINDOW_WIDTH, WINDOW_HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, host_rgb);
        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    // Clean up GLFW
    glfwTerminate();

    // Clean up memory
    cudaFree(dev_rgb);
    delete[] host_rgb;

    return 0;
}

I am very new with GLFW and cant say I understand everything in the code , but my aim is to execute a program which uses both the CUDA and GLFW library.

Note- I am able to run independant GLFW sample codes using g++ compiler but I am facing a variety of errors when I am trying to do the same with the nvcc compiler

My project structure looks like this -

| include
  | (all the include files from the glfw-3.3.8.bin.WIN64 folder)
| lib-mingw-w64
  | (all the files in the lib -mingw-w64 folder)
| lib-vc2019
  | (all the files in the lib-vc2019 folder)
| glfw3.dll
| sample_code.cu

And to compile this file in the integrated terminal I am writing -

nvcc -Llib-vc2019 sample_code.cu -o sample_code -lglfw3 -lopengl32 -lgdi32 

As I said I am able to compile and execute g++ compiled code so I think the native GLFW libraries are set correctly , but when I execute the above command I get errors like -

sample_code.cu
tmpxft_00007b28_00000000-10_sample_code.cudafe1.cpp
   Creating library sample_code.lib and object sample_code.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4217: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwParseUriList'
LINK : warning LNK4286: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(context.obj)'
LINK : warning LNK4286: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4217: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(egl_context.obj)' in function '_glfwCreateContextEGL'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(wgl_context.obj)' in function '_glfwCreateContextWGL'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(egl_context.obj)' in function '_glfwCreateContextEGL'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(osmesa_context.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_monitor.obj)' in function 'createMonitor'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(vulkan.obj)' in function '_glfwGetVulkanResultString'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_window.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwInputError'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(window.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_init.obj)' in function '_glfwPlatformInit'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(wgl_context.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(egl_context.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(osmesa_context.obj)'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_monitor.obj)' in function '_glfwGetMonitorContentScaleWin32'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(vulkan.obj)' in function '_glfwGetVulkanResultString'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_window.obj)'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(init.obj)' in function 'terminate'       
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(window.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_init.obj)' in function '_glfwPlatformTerminate'
LINK : warning LNK4217: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwParseUriList'
LINK : warning LNK4286: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4286: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(win32_monitor.obj)'
LINK : warning LNK4286: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4217: symbol 'strtol' defined in 'libucrt.lib(strtox.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwParseUriList'
LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwInputError'
LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'glfw3.lib(win32_joystick.obj)' in function '_glfwInitJoysticksWin32'
LINK : warning LNK4217: symbol 'strncpy' defined in 'libucrt.lib(strncpy.obj)' is imported by 'glfw3.lib(window.obj)' in function 'glfwWindowHintString'
LINK : warning LNK4286: symbol 'strncpy' defined in 'libucrt.lib(strncpy.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4286: symbol 'strncpy' defined in 'libucrt.lib(strncpy.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4286: symbol 'strncpy' defined in 'libucrt.lib(strncpy.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4217: symbol 'strtoul' defined in 'libucrt.lib(strtox.obj)' is imported by 'glfw3.lib(input.obj)' in function 'parseMapping'
LINK : warning LNK4217: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'glfw3.lib(monitor.obj)' in function 'refreshVideoModes'
LINK : warning LNK4217: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'glfw3.lib(win32_joystick.obj)' in function '_glfwInitJoysticksWin32'
glfw3.lib(init.obj) : error LNK2019: unresolved external symbol __imp_strtok referenced in function _glfwParseUriList
glfw3.lib(context.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function sscanf
glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_strcspn referenced in function glfwUpdateGamepadMappings
glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_strspn referenced in function glfwUpdateGamepadMappings
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function _glfwPlatformInit       
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_TranslateMessage
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function _glfwPlatformInit       
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DispatchMessageW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function _glfwPlatformInit
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_PeekMessageW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function _glfwPlatformInit
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_UnregisterDeviceNotification referenced in function _glfwPlatformTerminate
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function _glfwPlatformInit        
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_CreateWindowExW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function _glfwPlatformTerminate     
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DestroyWindow
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function _glfwPlatformInit
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ShowWindow
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ToUnicode referenced in function _glfwPlatformInit
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function _glfwPlatformInit
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_MapVirtualKeyW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_SystemParametersInfoW
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3.lib(wgl_context.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ReleaseDC
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ChangeDisplaySettingsExW referenced in function _glfwPlatformGetVideoModes
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsW referenced in function _glfwPlatformGetVideoMode
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsExW referenced in function _glfwPlatformGetMonitorPos
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayDevicesW referenced in function _glfwPollMonitorsWin32
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetMonitorInfoW referenced in function _glfwPlatformGetMonitorWorkarea
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetMonitorInfoW
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayMonitors referenced in function _glfwPollMonitorsWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_TrackMouseEvent referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetMessageTime referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SendMessageW referenced in function _glfwPlatformSetWindowIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PostMessageW referenced in function _glfwPlatformPostEmptyEvent
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WaitMessage referenced in function _glfwPlatformWaitEvents    
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_UnregisterClassW referenced in function _glfwUnregisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassExW referenced in function _glfwRegisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetLayeredWindowAttributes referenced in function _glfwPlatformGetWindowOpacity
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetLayeredWindowAttributes referenced in function _glfwPlatformSetWindowOpacity
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_FlashWindow referenced in function _glfwPlatformRequestWindowAttention
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MoveWindow referenced in function _glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPos referenced in function _glfwPlatformMaximizeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowPlacement referenced in function createNativeWindow  
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPlacement referenced in function createNativeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsWindowVisible referenced in function _glfwPlatformMaximizeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsIconic referenced in function _glfwPlatformWindowIconified  
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_BringWindowToTop referenced in function _glfwPlatformCreateWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsZoomed referenced in function _glfwPlatformWindowMaximized  
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OpenClipboard referenced in function _glfwPlatformGetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CloseClipboard referenced in function _glfwPlatformGetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetClipboardData referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClipboardData referenced in function _glfwPlatformGetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_EmptyClipboard referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetFocus referenced in function _glfwPlatformCreateWindow     
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetActiveWindow referenced in function _glfwPlatformPollEvents
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetKeyState referenced in function _glfwPlatformPollEvents    
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MsgWaitForMultipleObjects referenced in function _glfwPlatformWaitEventsTimeout
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetSystemMetrics referenced in function _glfwPlatformMaximizeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function _glfwPlatformCreateWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetPropW referenced in function createNativeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetPropW referenced in function _glfwPlatformPollEvents       
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RemovePropW referenced in function _glfwPlatformDestroyWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function _glfwPlatformSetWindowTitle
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClientRect referenced in function _glfwPlatformGetFramebufferSize
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowRect referenced in function _glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_AdjustWindowRectEx referenced in function _glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursorPos referenced in function _glfwPlatformPollEvents
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursor referenced in function _glfwPlatformSetCursor       
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function _glfwPlatformGetCursorPos 
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClientToScreen referenced in function _glfwPlatformGetWindowPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ScreenToClient referenced in function _glfwPlatformGetCursorPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WindowFromPoint referenced in function cursorInContentArea    
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClipCursor referenced in function updateClipRect
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetRect referenced in function _glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OffsetRect referenced in function _glfwPlatformMaximizeWindow 
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PtInRect referenced in function cursorInContentArea
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowLongW referenced in function _glfwPlatformGetWindowOpacity
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowLongW referenced in function _glfwPlatformMaximizeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClassLongPtrW referenced in function _glfwPlatformSetWindowIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadCursorW referenced in function _glfwPlatformSetCursor     
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DestroyIcon referenced in function _glfwPlatformDestroyCursor 
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function _glfwPlatformCreateStandardCursor
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateIconIndirect referenced in function createIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MonitorFromWindow referenced in function _glfwPlatformGetWindowContentScale
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputData referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterRawInputDevices referenced in function _glfwPlatformSetRawMouseMotion
glfw3.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceInfoA referenced in function deviceCallback
glfw3.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceList referenced in function deviceCallback 
sample_code.exe : fatal error LNK1120: 84 unresolved externals

Now I realise I could be missing a lot of steps but I tried to look around to find any concrete steps to setup such an environment and right now I am in a fix with no idea whatsoever on how to move forward!

Well running
nvcc sample_code.cu -o sample_code -Llib-vc2019 -lglfw3_mt -lopengl32 -luser32 -lgdi32

Seems to have fixed the errors

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.