Which
compiler mode are you using?
In delphi mode string defaults to ansistring.
In objfpc mode, adding H+ directive is needed, but this is Lazarus default (when new unit is created, {$mode objfpc}{$H+} is automatically added).
What do you actually want to achieve?