[erlang-questions] Can't run my command line Erlang program

Andrew Pennebaker <>
Thu Nov 21 01:06:57 CET 2013


Thanks! "dialyzer --build_plt --apps erts kernel stdlib" fixes this. My
Makefile now looks like:

https://github.com/mcandre/mcandre/blob/master/erlang/Makefile

...would be nice if Erlang automatically generated this PLT as post-install.


On Sat, Nov 16, 2013 at 6:26 AM, Kostis Sagonas <> wrote:

> On 11/15/2013 10:34 PM, Andrew Pennebaker wrote:
>
>> Thanks, I might do that!
>>
>> ...so there's no way to tell dialyzer to just automatically add stdlibs
>> to plt?
>>
>
> Dialyzer is agnostic of what stdlib is, whether it contains a module named
> string or not, or for that matter whether you want to use the string module
> from stdlib or some other module named string in your application.  So you
> need to tell it what applications to cache in your .dialyzer_plt  when you
> build it for the first time.
>
> By the way, the sequence of commands you use below is not the one that I
> would use. Instead, I would first build a minimal PLT once:
>
>     dialyzer --build_plt --apps erts kernel stdlib
>
> and then use this PLT to analyze the modules of my application:
>
>     erlc -Wall +debug_info *.erl
>     dialyzer *.beam
>
> You do not need to add your application's modules to the PLT to analyze
> them. If at some point you discover that you need more stuff from the OTP
> libraries to analyze your application (e.g. the 'random' module), you can
> add them incrementally by a command of the form:
>
>     dialyzer --add_to_plt --apps crypto
>
> Hope it helps,
>
> Kostis
>
>  On Fri, Nov 15, 2013 at 2:52 AM, Anthony Molinaro
>> < <mailto:>> wrote:
>>
>>     You can add them to your .plt with something like
>>
>>     # dialyzer --add_to_plt --apps crypto stdlib proper ...
>>
>>     Which should get rid of the warnings.
>>
>>     -Anthony
>>
>>
>>     On Nov 14, 2013, at 8:03 PM, Andrew Pennebaker
>>     < <mailto:>>
>>
>>     wrote:
>>
>>      Is there a way to clear the "unknown functions" from dialyzer
>>>     output? They tend to distract from any warnings I'm trying to find.
>>>
>>>     $ make lint
>>>     erlc -Wall +debug_info ios7crypt.erl
>>>     dialyzer *.beam --build_plt --quiet
>>>     dialyzer *.beam
>>>
>>
>


-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131120/442891a3/attachment.html>


More information about the erlang-questions mailing list