LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2003, 08:43 AM   #1
sikil_nuru
LQ Newbie
 
Registered: Jun 2003
Location: Sweden
Distribution: SuSe 9.0
Posts: 13

Rep: Reputation: 0
Question Programming under Linux and other stuff


Hello!
Im tired of <you-know-what>īs instability and want to try
using Linux.
It would be really great if anyone could answer some of my
questions. Here we go:

#1: Ive been programming in C++ under Win32 for some time.
I have Borland C++ Builder 5.5 and really like it.
When programming under Linux you use GCC.
#1: Is there any other C++compiler for Linux besides GCC?
#2: When i try to put a function into another source-file
GCC shows an error. I put the function-declarations
at the top of the main source-file and the function-code
in antoher source-file (wich i #include "xxxx").
My Borland Compiler accsepts this, but GCC sez
"function xxxxx() already declared"!
Doesnt GCC have a "smart"-linker?
#2: I have this book, "Linux 3D Graphics Programming"
and it explains really well how the X-window system works.
Now the Linux System-monitor show that X takes up an
enourmes 59 MB of RAM!! Ive heard of something called
"Mesa" wich is some sort of API you sue when programming
OpenGL (i have made OpenGL programs under win32).
Does you have to have X loaded if you want to use Mesa?
Where do i get Mesa?
#3: Ive noticed that Linux uses tar.gz for file-packing
(windows uses .cab, .zip, .rar etc.).
How do i extract tar.gz-files?
#4: On my Samsung hard-drive i have two partitions,
one small for the OS and one large for everything else.
This way i dont loose all of my data when re-installing
windows (i have done that ALOT of times!).
I know that Linux doesnt have C:\, D:\ etc partitions but
instead uses root, home, usr etc. folders.
When installing RH-Linux i made a large partition and set its
mount-point to /home and a small partition where i put
everything else. I made some x-diagrams for my up-coming
OpenGL 3D-engine and i stored them in the /home-folder.
Now when i re-installed RH-linux i didnt touch the
/home-partition, but all my x-diagrams got lost!
What shall i do to create a partition where i can put all the
stuff i dont want deleted, and how do i accses it
from Linux?
#5: When i installed RH Linux i got tho choose what packages
i wanted, i choosed 95% of them .
Even though i dont need support for Python-scripts for
the time-beeing, maybe ill start programming in Python and
i dont want to re-install Linux just because of that!
I have have a brand new IBM 80GB hard-drive so file-size
isnt a problem. But when i opened the system-monitor i got
a shock!! It looked worse then windows NT!!
All these programs laying there and cluttering up
valueble RAM. Ive only got 128MB and all of it is used by all
kinds of programs like python-support and these strange
mingetty and init. In windows you can use msconfig
to change autostart and remove stuff you dont want,
is there something similar under Linux?
#6: How do i accses my windows-formated partition on my
samsung hard-drive from Linux. I can start windows, put
files on a floppy, reboot the computer,start Linux and load
the files from the floppy, but that is VERY time consuming!!
(imgaine having to transfer a 100MB video-clip! AAARGGHH!!).
Is there a way of accsesing a windows-partition from
Linux or the other way around?

Greatfull for any answers!!

/
 
Old 06-01-2003, 09:03 AM   #2
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Rep: Reputation: 15
you can mount a windows-partition in Linux first you have to
know which device your windows-partition is if your harddisk
is master on ide-channel1 it is hda / slave on channel1 hdb
master channel2 hdc and ... (if you dont know just try)

now use fdisk /dev/hda for ex. and look which number your
windows-partition has hda6 for ex.

done this type in shell: su
your root-password

mount /dev/hda6 /mnt/windows for ex. (the directory /mnt/windows has to exist - create with mkdir /mnt/windows)

Good Luck
SchwipSchwap
 
Old 06-01-2003, 01:08 PM   #3
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
To extract .tar.gz files, type:
Code:
tar xzvf file.tar.gz
tar - program to run
xzvf - options for tar (x: extract, z: gzip file, v: verbose, f: filename (must be last option since the next thing is the filename))
file.tar.gz - your tarball
 
Old 06-01-2003, 02:00 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
5) You wouldnt need to reinstall the OS just to add support for a language or anything like that.
The kernel often uses as much ram as possible to speed up actions and cache things, so unless you're experiencing slow performance, dont worry about it.
I dont know which python processes might be active. Init is related to how the system starts, and mingettys are login prompts. Press Ctrl+Alt+Fone to six for them, or Ctrl+Alt+F7 for your gui screen again.
Try the ps or top commands (read their man pages), or use something like GKrellm to monitor resource usage.
 
Old 06-01-2003, 02:48 PM   #5
sikil_nuru
LQ Newbie
 
Registered: Jun 2003
Location: Sweden
Distribution: SuSe 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by SchwipSchwap
you can mount a windows-partition in Linux first you have to
know which device your windows-partition is if your harddisk
is master on ide-channel1 it is hda / slave on channel1 hdb
master channel2 hdc and ... (if you dont know just try)

now use fdisk /dev/hda for ex. and look which number your
windows-partition has hda6 for ex.

done this type in shell: su
your root-password

mount /dev/hda6 /mnt/windows for ex. (the directory /mnt/windows has to exist - create with mkdir /mnt/windows)

Good Luck
SchwipSchwap
Thanks, it worked .

/
 
Old 06-01-2003, 02:58 PM   #6
sikil_nuru
LQ Newbie
 
Registered: Jun 2003
Location: Sweden
Distribution: SuSe 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Proud
5) You wouldnt need to reinstall the OS just to add support for a language or anything like that.
The kernel often uses as much ram as possible to speed up actions and cache things, so unless you're experiencing slow performance, dont worry about it.
I dont know which python processes might be active. Init is related to how the system starts, and mingettys are login prompts. Press Ctrl+Alt+Fone to six for them, or Ctrl+Alt+F7 for your gui screen again.
Try the ps or top commands (read their man pages), or use something like GKrellm to monitor resource usage.
I tried typing "setup", and the Red Hat Setup Program came
up. There was a menu called "services" and i looked in it.
There you could choose what serviceīs you wanted or not.
I removed ALL of them .
Then, after i rebooted the system, the X-server didnt want to
start .
I tryied adding the serviceīs i removed, but it still didnt start
(probally missed a few ).
I typied printenv DISPLAY and saw that the DISPLAY-variabel
wasnt set, so i typed export DISPLAY=127.0.0:1:0
(or something like that, its in my Linux 3DG Programming-book),
but the X server STILL didnt want to start!
LoL!! Linux is powerfull, but it isnt easy (and it requires alot of
RAM)!
 
Old 06-01-2003, 05:26 PM   #7
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Hmm, I think you may have only changed the default runlevel, number 5. In which case, try editing that /etc/inittab and default to 3. Then use startx to get back to a gui. Then see if you can copy the options used for 3 to 5, and add a display manager.
 
Old 06-01-2003, 09:11 PM   #8
Rick422
Member
 
Registered: Apr 2003
Location: Arizona
Distribution: Red Hat Linux 9
Posts: 158

Rep: Reputation: 30
You can use either g++ or gcc to compile under Linux. I believe they are more or less the same thing and that one of them just calls the other using certain options. The command for working with make files is make. Those programs are usually installed by default. Another program which is usually not installed by default is the Dynamic Data Debugger. If it is installed you can open it by typing ddd. The Dynamic Data Debugger is a GUI point and click type program that runs under X-Windows. When I installed Red Hat it was an optional component that was not installed by default.

It has been over a year since I took a course and we used all of those. Because I have not used it lately, I am not sure about your error message. There are other compilers avilable for Linux, but I have not tried them. Compiling from the command line was new to me, in a previous C++ course we had used Visual C++. However, I quickly qot used to doing it from the command line. We got heavily into object orinted progammin in C++ in the second course.
 
Old 06-01-2003, 09:16 PM   #9
Rick422
Member
 
Registered: Apr 2003
Location: Arizona
Distribution: Red Hat Linux 9
Posts: 158

Rep: Reputation: 30
Here is one other thought. In another course I took, we once used the emacs text editor to call the gcc or g++ compiler when compiling a C++ program. I believe that can also be done with the vi text editor if I am not mistaken. We only did that once over a year ago, so I do not recall the details using emacs for that purpose. I do not konw if any of that helps you or not?
 
Old 06-02-2003, 12:08 PM   #10
0x4B
Member
 
Registered: May 2003
Location: Nashville TN, USA
Distribution: Debian (I'm unstable)
Posts: 117

Rep: Reputation: 15
if you're including the second file in the first one, then you don't need to provide any other information in the main file about the functions in the included file. I not all together ontop of what constitutes standard c++, but there are a lot of things that borland will/won't accept that gcc or a microsoft compiler would feel differently about.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 05:37 PM
Im new to all this linux stuff! So please help! huggybeer Linux - Newbie 7 08-12-2004 09:48 AM
how do i actually install stuff in linux?? stagnant7 Linux - Newbie 3 09-05-2003 03:32 PM
Ark Linux - need some help with some stuff... Braxas26 Linux - Newbie 1 08-13-2003 01:53 AM
linux fun stuff punt Linux - General 14 08-30-2001 08:57 AM


All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration