Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: cpp problem< Next Oldest | Next Newest >
Di4l Offline





Group: Members
Posts: 8
Joined: Dec. 2006
Posted: Dec. 12 2006,10:38 QUOTE

Hello all,

 I am new to Linux, so please forgive my ignorance. I would like to know what "script" I need to launch to set the enviroment options, paths, etc... to be able to use cpp.

 So far, when I open a terminal, if I type cpp, it does not find the binary as it is not in the environment path.

 Here at work, we use Solaris, and to be able to compile we have to execute a script to set all the necessary variables. My problem is taht I don ot know how to create such a script from scratch and for DSL.

 Any help would be apreciated. Thank you

Di4l
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 12 2006,14:16 QUOTE

Cpp is not found in DSL, so that would explain your trouble. DSL base system has only tcc for C development.
The gcc compiler, complete with cpp, make and many headers, is available through the MyDSL system.

In Linux, the scripts used to set up your environment include .bash_profile, .bashrc, and .xinitrc, depending of course on whether or not you're using Bash, and what sort of environment changes are necessary. In any case, these scripts are usually automatically run at the appropriate time.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
Di4l Offline





Group: Members
Posts: 8
Joined: Dec. 2006
Posted: Dec. 13 2006,11:25 QUOTE

Hello,

 Thank you very much for your reply. On the DSL packages, the cpp (GNU C compiler) is listed down. In any case I would install the gcc package (already downloaded).

 About the scripts. This is probably a very stupid question but I am very new to Linux... How does the system "know" what type of script needs to run? I mean, if I open a terminal and I want to compile, how does it automatically know that I wnat to use the gcc compiler to run the appropriate script? Don't I have to run it specifically? (Something like ". ./.bashrc" or whatever).

 One last question. On Dillo screen that pop-ups at the DSL start, it explains how to do a hard-disk installation. It recomends using the Frugal install for several reasons, one of which concerns the dsl packages. I am not sure I understand correctly but, does that mean that if I use the other installation (Debian like) I cannot setup the dsl packages I want to run at boot time?

 Sorry for all the hassle

Di4l
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Dec. 13 2006,14:42 QUOTE

That page does not reflect what's currently in the recent default iso.

Depending on the script, it will know :P
Sometimes you may have to point CC to gcc, (ie CC=gcc or symlink cc to gcc) but most of the time ./configure (or similar) will uhh configure everything for you :)

Not really needed for this topic, but those are startup scripts - so you don't have to call them again (unless you changed it during a session or using a different app that doesn't look at them)

For Debian-style installation, using dsl packages may work, but it's permanently installed - with the exception of the only safe extensions: uci's (and unc's will not work).
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 13 2006,14:51 QUOTE

The packages page is hopelessly out of date. The 50mb self-imposed size limit of DSL requires that any addition to DSL's size in one area results in the removal of something else. As the distro has evolved, the software selection has changed. By the way, cpp is preprocessor, gcc is the gnu C compiler. tcc (tiny C compiler) is available in DSL.

The system know which scripts to run only because of the way it is configured, and the way certain applications (such as bash) are built.  As far as choosing the appropriate compiler, this is often done by the makefiles included with source packages. Many of them will set the CC variable to gcc by default, so if you have gcc installed into a standard location (/bin, /usr/bin, /usr/local/bin) it will be found. Otherwise this is a case where manual intervention might be necessary. I don't know what method you use to compile, so i can't say uch about that particular subject. Some other scripts are run automatically simply because that's the way the software has been coded. Bash will run $HOME/.bash_profile when you log in, so if you have any environment variables exported from that script they will apply to subsequent shells. The .bash_profile script can be overridden when you start an x session by changing variables in .xinitrc, which is automatically run when X is started.

If you have a Debian-style harddrive install, any *.dsl or *.tar.gz extesions you add to the system will stay in the system, so the auto-loading of them is not necessary. Extensions named *.uci are mounted, so they will still require auto-loading.  A word of caution, however...
myDSL extensions that write to the base system are not recommended for a Debian-style installation, and in some cases have been knwn to cause troubles.  If you have this type of installation, it is recommended that you consider using  Debian packages (apt-get/dpkg) instead of *.dsl or *.tar.gz (uci should still work without trouble).


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
7 replies since Dec. 12 2006,10:38 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: cpp problem

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code