Make sure that the header file ilocplex.h (Concert Technology Library) or cplex.h (Callable Library) is included at the top of your application source file. If that file is not included, then compile-time, linking, or runtime errors may occur.
ilocplex.h
cplex.h