Issue with classes in *.cu file when used as a library (solved)

I have been researching how to do this type of makefile for the past few days and have tried several things, but now I am out of ideas. I would greatly appreciate any insight as to where I am going wrong (this code works fine in Visual Studio btw!). I just do not know enough about compiling and linking CUDA in Linux to figure out if I have a typo or a general mis-understanding of how linking a CUDA library works.

I have a *.cu header file with an object that sets up parameters for memory allocation on the GPU. I also have cuda kernels and other things in this file, but I took it all out to debug, and besides, the errors appear to only be in relation to creating and destroying this object (at least that is where the code gets hung up right now). I have another library of c++11 code that I link to the main *.cpp file as well.

The error I get when I try to link is this:

main.o: In function main': main.cpp:(.text.startup+0x1a): undefined reference to param::param(unsigned int, unsigned int, unsigned int)’
main.cpp:(.text.startup+0x22): undefined reference to `param::~param()’

My cuda header file is:

param.h

class TPSwarp_cuparam : public TPSwarp_param
{
public:
	param(uint nm, uint ni, uint nj);
	~param();
	uint max_L_mem_size;
//and so forth...

}

param.cu

#include "param.h"

param::param(uint nm, uint ni, uint nj)
{
	max_L_mem_size =nm*ni*nj;
}

main.cpp

#include "param.h"

int main(int argc, char *argv[]) 
{
	param test(10,5,5);

	return(0);

};

my makefile contains this:

CUDA_PATH       ?= /usr/local/cuda-6.0
CUDAINCLUDES = -I$(SOURCE_DIR) \
-I$(CUDA_PATH)/include \
-I/usr/local/NVIDIA_CUDA-6.0_Samples/common/inc
CCFLAGS = -Xcompiler #basically some stuff copied from cuda sample makefiles...
CUDAFLAGS = -c -O2 -DNDEBUG
GENCODE = -gencode arch=compute_20,code=sm_20
NVCC := $(CUDA_PATH)/bin/nvcc -ccbin g++

mainwcuda: cudalibrary main.o
	g++ -std=c++11 -o./Bin/cudaexe main.o -L./ -lcudalibrary -lcpp11library

param.o: param.cu
	$(NVCC) $(CUDAINCLUDES) $(CCFLAGS) $(GENCODE) -o $@ -c $<

cudalibrary: param.o
	ar r libcudalibrary.a param.o
	ranlib libcudalibrary.a

main.o: main.cpp
	g++ -std=c++11 $(CUDAFLAGS) $(CUDAINCLUDES) -o $@ $<

EDIT: I figured out what was wrong with my code. After trimming down all my files to just have the bare-minimum code, I found that I had an #ifdef around my class, for cases when cuda is not available. Once I took that out, my code finally was able to create an executable. I will leave this post up in case someone else needs another example of a makefile for cuda as a library.