[erlang-questions] Beginner's question on Erlang compilation

Bengt Kleberg <>
Mon Jun 9 11:36:16 CEST 2008


Greetings,

The compiler does not check functions in other modules. Look at xref
(http://www.erlang.org/doc/man/xref.html) if you want to do that.
It is a good idea, I have a script that does some xref checks after each
compile.


bengt

On Mon, 2008-06-09 at 10:31 +0200, Alexander Lamb wrote:
> Hello,
> 
> Ok, this is probably a stupid question, but somehow I have to ask!
> 
> When I compile my modules, the compiler doesn't check the existence of  
> functions in other modules.
> 
> In other words if I do:
> 
> lists:do_something_non_existent()
> 
> or
> 
> my_module:do_something_else(abc)
> 
> If those functions don't exist, I will only know it when my code runs  
> and crashes.
> Ok, so I understand what late binding means, but couldn't the compiler  
> at least test the existence of functions with a given arity?
> 
> I compile using erl -make
> 
> The makefile is generated by automake (I didn't manage, or want to  
> dive into the traditional makefiles, see post a few weeks ago:-)
> 
> Thanks for any hints (and please be indulgent, my first "real"  
> programming language was ADA so in terms of compilation, the warnings  
> are really different)
> 
> Alex
> --
> Alexander Lamb
> Founding Associate
> RODANOTECH Sàrl
> 
> 4 ch. de la Tour de Champel
> 1206 Geneva
> Switzerland
> 
> Tel:  022 347 77 37
> Fax: 022 347 77 38
> 
> http://www.rodanotech.ch
> 
> 
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list