Skip to main content

L1208 - Missing QLC header file

Warning

foo() ->
qlc:q([X || X <- [1,2,3]]).
%% ^^^ 💡 warning: qlc:q/1 called, but "qlc.hrl" not included

Explanation

This error occurs when you use QLC (Query List Comprehension) functions without including the required header file qlc.hrl.

QLC provides a query interface to Mnesia, ETS, DETS and other data structures, but it requires the inclusion of its header file to work properly.

To fix this error:

  1. Include the QLC header file at the top of your module
  2. Ensure you're using QLC functions correctly
-module(my_module).
-include_lib("stdlib/include/qlc.hrl").

foo() ->
qlc:q([X || X <- [1,2,3]]).