Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 1999 21:19:51 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        Mongoos411@aol.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Question about how to program in C++ in BSD.  And, help on install  X.
Message-ID:  <Pine.BSF.3.96.990504211219.7628A-100000@cygnus.rush.net>
In-Reply-To: <175d589b.2460f32f@aol.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 May 1999 Mongoos411@aol.com wrote:

> Hey there, i've got FreeBSD 2.2.7. There are a couple of things that im 
> trying to do.
> 
> 1.  Install X-Windows.  I tried, I read the FAQ, it seems that the first time 
> I tried it it created the *.log files.  yet when I tryed "startx" or "xdm" 
> noting happens.  I get "command not found."  I admit I am a begginer so I 
> found the FAQ a little hard to digest and still do.  Any FAQ on install X for 
> newbies?  Do I have have to compile it first before I make it?  If, so what 
> dir?

you need a .xinitrc file in your home directory, try this:

cd
echo twm > .xinitrc
chmod 755 .xinitrc
ln -s .xinitrc .xsession

then try xdm or startx

edit the $HOME/.xinitrc file to change which window manager you want
to run as well al other x11 applications.

note, that when .xinitrc finishing "running" you will exit X, another example:

twm &
xclock

when xlock dies, your X session will die.

> 
> 2.  This brings me to my next problem.  I tried to make World, but instead I 
> got "can't.  dont know how to make world"  Im stumpted guys.  Any suggestions.

you need to make sure you have installed the source tree, you can't just
"make world" from anywhere, you need to do it (as root) in /usr/src:

cd /usr/src
make world

> 3.  Lastly, I tried to compile and execute a simple  hello world program in 
> C++ on FreeBSD. I got an a.out file yet, when I type "a.out" to try to 
> execute it, it says "file not found."  Am I missing something here?  Do I 
> need some ports or libraries or something?

unlike MS-DOG (err. DOS) the current directory in not in your "PATH"
to execute programs in your current path you should specify the path to
them like so:

let's say your home directory is in /usr/home/jeff, and you have your
a.out, you should either type:

/usr/home/jeff/a.out

or more simply:

./a.out 

the second one only works if you are in your home directory and translates
into "run a.out from my current directory"  "." is a synonym for the
current directory like .. is a synonym for the directory above.

> Any help to these questions would be greatly appreciated for a struggling 
> unix person.  Thanks for your time

*chuckle* your third problem is what got me a "late" on my first homework
in my first programming class where i had to use unix.  We all have to
start somewhere.

enjoy,
-Alfred



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990504211219.7628A-100000>