'Already defined' linking error Problem with multiple .cu files

There must be a really obvious solution to this, but I’m not sure what it is. I’m using Jared’s build rule, and I can’t get a very simple project to compile. I have two .cu files.


#include <subfile.cu>

int main(int argv, char** argc)


	return 0;



#ifndef SUBFILE_CU_H

#define SUBFILE_CU_H

#include <stdio.h>

void dummy()


	printf("this is a dummy");



This compiles fine, but when it goes to link it says that dummy is already defined in mainfile.obj. I know I’ve laid out multiple .cu files like this before, but I was editing some of the examples in the SDK. I haven’t used Jared’s build rule before. Anyone know what’s going on here?



is subfile.cu excluded from build?
if not, it should be AFAIK

Ahhh … That fixed it. Thanks a lot!