Erlang/OTP Forums

Author Message

<  Erlang  ~  code:add_pathz("/Users/seb/Documents/src"). does

riskyrisk
Posted: Mon Oct 13, 2008 3:10 pm Reply with quote
Joined: 11 Oct 2008 Posts: 8 Location: Netherlands
I'm using Mac OS X 10.5.5 and Elang 5.6.4

From the Erlang shell I type

1> code:add_pathz("/Users/seb/Documents/src").

I get:
true

But when I type
2> code:get_path().
I dont see my path

And if I type
3> c(bs).
% that's a file I have in src called bs.erl
I get:
./bs.erl:none: no such file or directory


So what am I doing wrong. And I'm very new to Erlang so pardon the newbie questions.
View user's profile Send private message
michal
Posted: Tue Oct 14, 2008 1:17 pm Reply with quote
User Joined: 20 Jul 2006 Posts: 44 Location: London
Hi,
the function you are calling adds the new path at the end of the list. When calling code:get_path(), you probably get a list which is too long to be displayed on the terminal and it is truncated with three dots at the end. This does not mean that the new path has not been added. Adding a path to the code path is only needed if you want to load compiled beam files with l(modulename). It does not have any effect on c(modulename).

The c() function you are using to compile assumes that the *.erl file is in the current working directory.

Michal

_________________
http://www.erlang-consulting.com
View user's profile Send private message
riskyrisk
Posted: Wed Oct 15, 2008 9:46 am Reply with quote
Joined: 11 Oct 2008 Posts: 8 Location: Netherlands
Yep. That explains it.
I guess you'd recommend I move over to make to handle my compiling in the long run?
View user's profile Send private message
Cy6erBr4in
Posted: Thu Oct 16, 2008 12:07 pm Reply with quote
Joined: 16 Oct 2008 Posts: 9
Hello,

in this case there are two ways:

1) you can try something like this:

> cd("/Users/seb/Documents/src").
/Users/seb/Documents/src
ok
> c(bs).
{ok, bs}

or..

2)> c("/Users/seb/Documents/src/bs.erl").
{ok, bs}

Also, you can add this string to your ~/.erlang file:
cd("/Users/seb/Documents/src").

and every time when you`ll start erl, you`ll change work directory to "/Users/seb/Documents/src" automatically.

Good luck!

---
With Best Regards,
Alexander Dergachev
View user's profile Send private message
dsmith
Posted: Fri Oct 17, 2008 3:45 pm Reply with quote
User Joined: 08 Aug 2007 Posts: 41 Location: Toronto
riskyrisk wrote:
I guess you'd recommend I move over to make to handle my compiling in the long run?


Sure, you can use make for any "real-world" projects. You may also want to look at http://www.erlware.org/. They have a really nice build system call sinan.
View user's profile Send private message
wuji
Posted: Thu Sep 13, 2012 6:37 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
to call the police so they can pay me the money."Suarez said said cheap polo shirts said she left Colombia for a few days because of concerns her
could be in danger and has had no contact with any American American replica designer bags for sale American official."As far as the investigators go, just like the Secret Service
are dumb, imagine the investigators," she said.Throughout her appearance this morning, dressed dressed cheap authentic jordans dressed in a skimpy green blouse, Suarez laughed and smiled even as
host reminded her of the seriousness of the scandal."This is who I I cheap Ralph Lauren Polo I am and all I really care about is my mother and
young son," Suarez said.She also said that she was with a friend friend [h4]cheap jordan shoes[/h4] friend when she first met Huntington in the disco, and that another
who was with Huntington "fell in love" with her friend, though they they cheap jordan shoes they did not have sex. "Their love story ended in the bar,"
View user's profile Send private message
dongdongwu
Posted: Wed Sep 19, 2012 8:00 am Reply with quote
User Joined: 19 Sep 2012 Posts: 236
Girls would refuse to even leave their replicas behind. specifically when the product beats the complete meaning of the Christian Louboutin men outlet; in conditions of good quality and detailing.If Cinderella was residing in your twenty primary century as opposed to the aged a single then there would not be any 'Happy actually after'. properly appears like girls nowadays are as well fond of the strong;Christian Louboutin Men Shoes to leave them in your center of nowhere.Christian Louboutin for men Shoes would arrive true handy being a excellent handbag using the glimpse and really feel belonging to the authentic but at a very much lesser price tag adding as very much as types picture in your process.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum