topdawgg19
Programmer
I get the following linking error when I try to execute my code...
========================================================
Lexer2.obj : error LNK2001: unresolved external symbol "void __cdecl separators(void)" (?separators@@YAXXZ)
Debug/Lexer2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
===========================================================
If I take out my separator function all together then the code will execute. Any ideas of what is wrong? See below for my separator function.
#include <iostream.h>
#include <stdio.h>
#include <cstdlib>
#include <iomanip.h>
#include <fstream.h>
void separators();
void seperators()
{
if (source[start]=='(')
lexeme[0]='(';
if (source[start]==')')
lexeme[0]=')';
if (source[start]=='{')
lexeme[0]='{';
if (source[start]=='}')
lexeme[0]='}';
if (source[start]=='[')
lexeme[0]=']';
if (source[start]==';')
lexeme[0]=';';
if (source[start]==',')
lexeme[0]=',';
start=current; //set start equal to new starting spot
end=current; //set end to new starting spot
token='s';
}
========================================================
Lexer2.obj : error LNK2001: unresolved external symbol "void __cdecl separators(void)" (?separators@@YAXXZ)
Debug/Lexer2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
===========================================================
If I take out my separator function all together then the code will execute. Any ideas of what is wrong? See below for my separator function.
#include <iostream.h>
#include <stdio.h>
#include <cstdlib>
#include <iomanip.h>
#include <fstream.h>
void separators();
void seperators()
{
if (source[start]=='(')
lexeme[0]='(';
if (source[start]==')')
lexeme[0]=')';
if (source[start]=='{')
lexeme[0]='{';
if (source[start]=='}')
lexeme[0]='}';
if (source[start]=='[')
lexeme[0]=']';
if (source[start]==';')
lexeme[0]=';';
if (source[start]==',')
lexeme[0]=',';
start=current; //set start equal to new starting spot
end=current; //set end to new starting spot
token='s';
}