Error LNK2019: Symbol extern undefined. My code (cuda 6.0), why not work? Help-me friends please.

Hey guys here is my code of an lexical analyzer,

#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <regex>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <sstream>
#include <time.h>  
#include <random>
#include <algorithm>
#include <map>
#include <vector>

using namespace std;

struct vetorCRelacaoAClasse
{
	string dado;
	string classe;
};

typedef struct vetorCRelacaoAClasse vcrac;

vector<string> lerArquivoEArmazenaVector(FILE *arq);

string stringComDataSet(vector<string> dataVetor);
string lerRelacao(string Linha_lida);
int qntClasses(string Linha_lida);
vector<string> lerClasses(string Linha_lida);
vector<string> lerAtributos(vector<string> Linha_lida);
int qntAtributos(vector<string> Linha_lida);
int indiceDeOcorrenciaDeData(vector<string> Linha_lida);
vector<string> conjuntoDeDados(vector<string> Linha_lida);
int instancias(vector<string> Linha_lida);
vector<string> explode(string Linha,string ER);
vector<vcrac> vectorDataSet(vector<string> conjuntoDeDados, vector<string> Linha_lida);
map<string,vector<vcrac>> finalDataSet(vector<string> vectorDataSet, vector<string> Linha_lida);

vector<string> lerArquivoEArmazenaVector(FILE *arq)
{

	  char Linha[100];
	  char *result;
	  vector<string> dataArff;
	  system("cls");
	  arq = fopen("Data/miniminiiris.arff", "rt");
	  if (arq == NULL)
	  {
		 cout<<"Arquivo nao encontrado"<<endl;
		 system("Pause");
		 exit(0);
	  }
	  else{
		  while (!feof(arq))
		  {
			  result = fgets(Linha, 100, arq);
			  if (result);
			  {
				  dataArff.push_back(result);
			  }
		  }
	  }
	  fclose(arq);
	  return dataArff;
}

string stringComDataSet(vector<string> dataVetor)
{
	const int n = dataVetor.size();
	string data;

	for(int i = 0; i< (int)(dataVetor.size());i++)
	{
		data += dataVetor[i];
	}
	return data;
}
string lerRelacao(string Linha_lida)
{
	regex rx1("^@RELATION.(.+)"); 
	cmatch mr;
	regex_search(Linha_lida.c_str(), mr, rx1);
	string str= mr[1];
	return str;
}
int qntClasses(string Linha_lida)
{
	int qntClasse;
	vector<string> classes;
	regex rx1("^@ATTRIBUTE.class.(.+)$"); 
	cmatch mr2;
	regex_search(Linha_lida.c_str(), mr2, rx1);
	string str2= mr2[1];
	classes = explode(str2,",{} ");
	qntClasse = classes.size();
	return qntClasse;
}
vector<string> lerClasses(string Linha_lida)
{
	vector<string> classes;
	regex rx1("^@ATTRIBUTE.class.(.+)$"); 
	cmatch mr2;
	regex_search(Linha_lida.c_str(), mr2, rx1);
	string str2= mr2[1];
	classes = explode(str2,",{} ");
	return classes;
}
vector<string> lerAtributos(vector<string> Linha_lida)
{	
	vector<string> str;
	for(int i=0; i<(int)(Linha_lida.size());i++)
	{
		regex rx("^@ATTRIBUTE.([a-zA-Z]+)"); 
		cmatch mr;
		if(regex_search(Linha_lida[i].c_str(), mr, rx))
		{
			str.push_back( mr[1]);
		}
	}
	return str;
}
int qntAtributos(vector<string> Linha_lida)
{
	int qntAtributo = 0;
	for(int i=0; i<(int)(Linha_lida.size());i++)
	{
		regex rx("^@ATTRIBUTE.([a-zA-Z]+)"); 
		cmatch mr;
		if(regex_search(Linha_lida[i].c_str(), mr, rx))
		{
			qntAtributo++;
		}
	}
	return qntAtributo;
}
int indiceDeOcorrenciaDeData(vector<string> Linha_lida)
{
  int data;
  for(int i=0;i < (int)(Linha_lida.size());i++)
  { 
	  if (strstr(Linha_lida[i].c_str(),"@DATA"))
	  {
		  data = i;
		  break;
	  }
  }
  return data+1;
}
vector<string> conjuntoDeDados(vector<string> Linha_lida)
{
	vector<string> conjuntoDeDados;
	for(int i = indiceDeOcorrenciaDeData(Linha_lida); i<(int)(Linha_lida.size()); i++)
	{
		conjuntoDeDados.push_back(Linha_lida[i]);
	}
	return conjuntoDeDados;
}
int instancias(vector<string> Linha_lida)
{
	int instancias = 0;
	for(int i = indiceDeOcorrenciaDeData(Linha_lida); i<(int)(Linha_lida.size()); i++)
	{
		instancias++;
	}
	return instancias;
}
vector<string> explode(string Linha,string ER)
{
	vector<string> explode;
	char *cstr= new char [Linha.length()+1];
	strcpy(cstr,Linha.c_str());
	char *p = strtok (cstr,ER.c_str());
	while (p!=0)
	{
		explode.push_back(p);
		p = strtok(NULL,ER.c_str());
	}
	free(cstr);
	return explode;
}
vector<vcrac> vectorDataSet(vector<string> conjuntoDeDados, vector<string> Linha_lida)
{
	vector<string> dados;
	vector<vcrac> vetorConjunto;
	vcrac data;

	for(int i = 0; i < (int)(conjuntoDeDados.size());i++)
	{
		dados = explode(conjuntoDeDados[i],",\n");
		for(int j=0;j<(int)(dados.size());j++)
		{
			data.dado = dados[j];
			data.classe = dados[dados.size() - 1];
			vetorConjunto.push_back(data);
		}
	}
	return vetorConjunto;
}
map<string,vector<vcrac>> finalDataSet(vector<vcrac> vectorDataSet, vector<string> Linha_lida)
{
	vector<string> atributosVetor;
	atributosVetor = lerAtributos(Linha_lida);
	map<string, vector<vcrac>> mapa;
	vector<vcrac> treino;
	vcrac datas;
	int constUniverso = qntAtributos(Linha_lida);
	for(int consts=0;consts<constUniverso - 1;consts++)
	{
		treino.clear();
		for(int i= consts;i<(int)(vectorDataSet.size());i = i + constUniverso)
		{
			datas.dado = vectorDataSet[i].dado;
			datas.classe = vectorDataSet[i].classe;
			treino.push_back(datas);
		}
		mapa[atributosVetor[consts]]=treino;
	}
	return mapa;
}

int main(void)
{
	vector<string> classes;
	vector<string> dataSet;
	vector<string> atributos;
	vector<string> conjuntoDeDado;
	FILE *arq = NULL;
	string data = "";
	string relacao = "";
	map<string,vector<vcrac>> mapa;
	vector<vcrac> vetorDeConjuntoDeDados;
	dataSet = lerArquivoEArmazenaVector(arq);
	data = stringComDataSet(dataSet);
	relacao = lerRelacao(data);
	classes = lerClasses(data);
	atributos = lerAtributos(dataSet);
	conjuntoDeDado = conjuntoDeDados(dataSet);
	vetorDeConjuntoDeDados = vectorDataSet(conjuntoDeDado, dataSet);
	mapa=finalDataSet(conjuntoDeDado,dataSet);
	system("pause");
	return 0;
}

1> Compiling CUDA source file main.cu…
1>
1> C:\Users\Giovanni\documents\visual studio 2012\Projects\eliminandoExtern\eliminandoExtern>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin\nvcc.exe” -gencode=arch=compute_30,code=“sm_30,compute_30” --use-local-env --cl-version 2012 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include" -G --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static -g -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o Debug\main.cu.obj “C:\Users\Giovanni\Documents\Visual Studio 2012\Projects\eliminandoExtern\eliminandoExtern\main.cu”
1> main.cu
1>main.cu.obj : error LNK2019: símbolo externo indefinido “class std::map<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::vector<struct vetorCRelacaoAClasse,class std::allocator >,struct std::less<class std::basic_string<char,struct std::char_traits,class std::allocator > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits,class std::allocator > const ,class std::vector<struct vetorCRelacaoAClasse,class std::allocator > > > > __cdecl finalDataSet(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >)” (?finalDataSet@@YA?AV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$vector@UvetorCRelacaoAClasse@@V?$allocator@UvetorCRelacaoAClasse@@@std@@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$vector@UvetorCRelacaoAClasse@@V?$allocator@UvetorCRelacaoAClasse@@@std@@@2@@std@@@2@@std@@V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@0@Z) referenciado na função _main
1>C:\Users\Giovanni\documents\visual studio 2012\Projects\eliminandoExtern\Debug\eliminandoExtern.exe : fatal error LNK1120: 1 externo não resolvidos

I´m using vs2012 and CUDA 6.0, ever try all procedure cited for the microsoft in your official site:
http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=PT-BR&k=k(LNK2019);k(VS.ErrorList)&rd=true
between other cited in others sites, help-me please i´m desperate.

Note: the code is functional in c/c++, but when i´m using cuda 6.0, appears this problem. I´m desperate.

It’s been pointed out on your Stack Overflow posting that you have inconsistent definitions/usage of finalDataSet in your code, and this is the reason for the linker error. It seems that your statement “Note: the code is functional in c/c++, but when i´m using cuda 6.0, appears this problem.” could not possibly be correct.