Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LINKING ERRORS IN Visual C++ 6.0 Standard Edition

Status
Not open for further replies.

topdawgg19

Programmer
Sep 26, 2004
9
US
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';

}
 
Code:
void separators();
void seperators()
look----^

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top