"make" not recognizing "dynamic"

I have a dynamic predicate in my program. When I run the program by consulting within SWI or by double-clicking the file name it runs OK. If I run the predicate edit, Compile/Comile buffer works OK, but Compile/Make complains that the predicate is not defined and that I need “dynamic”!

:- dynamic occurences/1.

choose_variable_original(Assignments, Variable) :-
occurrences(List),
repeat,
nth1(_, List, _-Variable),
+ memberchk(assign(Variable, _, _, _), Assignments), !.

“occurrences” is spelt wrongly here

but correctly in the program.