io.cuh:
#ifndef IO_CUH
#define IO_CUH
#include <cuda.h>
typedef struct{
unsigned width;
unsigned height;
unsigned char *image; //RGBA
}rgb_image;
__global__ void transformToGrayKernel(rgb_image *img);
void decodeTwoSteps(const char* filename, rgb_image *img);
void encodeOneStep(const char* filename, rgb_image *img);
void processImage(const char *filename, rgb_image *img);
#endif // IO_CUH
I'm trying to compile simple program using the following makefile:
lodepng.o: lodepng.h
cc -c lodepng.c -o lodepng.o
io.o: io.cuh lodepng.o
nvcc -c io.cu -o io.o
main: io.o
nvcc main.c io.o -o main
'main.c' uses one function from io.cu, which is dependent on lodepng.c.
After some minor warnings that reference to the code, I got the following error:
nvcc main.c io.o -o main nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release. In file included from main.c:1:0: io.cuh:12:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘void’ global void transformToGrayKernel(rgb_image *img); ^ makefile:6: recipe for target 'main' failed make: *** [main] Error 1
Aucun commentaire:
Enregistrer un commentaire