I'm trying to compile a CUDA C code in Windows command line. I've already installed cuda toolkit and nvcc
works fine. But the code includes png.h
and I'd like to know what is the proper way to provide it.
Specifically, I want to learn what are the default directories in which nvcc looks for headers and .dll
s. And how should I install such standard C libraries: do I necessarily have to use MinGW and somehow add C:\MinGW\include
and C:\MinGW\bin
to the PATH
?
Currently my solution looks in the following way:
$ nvcc mandelbrot-dynamic.cu -O3 -arch=sm_35 -rdc=true -lcudadevrt -Xcompiler -fopenmp -Ic:/mingw/include/ -o dynamic
And the result is:
cl : Command line warning D9002 : ignoring unknown option '-fopenmp' mandelbrot-dynamic.cu
c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/amd64/../../../VC/INCLUDE\yvals.h(472) : warning C4005: '_EXTERN_C' : macro redefinition
c:/mingw/include/_mingw.h(258) : see previous definition of '_EXTERN_C'
c:/mingw/include/float.h(38) : fatal error C1021: invalid preprocessor command 'include_next'
It doesn't complain about png.h
but there is conflict between MSVC and MingW. Plus, nvcc doesn't accept a preprocessor command from a mingw header.