compiling C++ source codes in windows
What if you want to show your program [prog3] to your friends who are using windows?
well, for this, too, we can compile a C++ source code in windows.
This is a little bit more complicated than compiling in fedora. However, it still works and that’s what we want!
anyway, to start we must install Cygwin from cygwin.com
now just install it and follow the instruction for installation.
now run Cygwin from your desktop and it will give you a terminal-like window.
copy the source code you have (source.cpp) into C:\cygwin\home\username
now just type $ g++ source.cpp -o prog3 and you have an executable file called prog3.exe
type ./prog3.exe to run it
if you want to use command prompt for running prog3.exe, you can cd into the place that the source is (for example [cd c:\Documents and Settings\user\Desktop] and then type
prog3.exe
your program will run
compiling multi-source C++ codes in fedora
First read the previous post about the required packages you should install (GCC, GCC-C++ and compat-libs) now if you have multiple source codes and you want to compile them into one program, you should execute this command.:
Suppose you have three source codes called source1.cpp source2.cpp and source3.cpp and you want to compile them into one program called prog2
$ cd /where/sources/are
$ g++ source1.cpp source2.cpp source3.cpp -o prog2
$ ./prog2 [to run the prog2 program]
also you can compile them seperately and link them together by doing:
$ g++ -c source1.cpp
$ g++ -c source2.cpp
$ g++ -c source3.cpp
$ g++ source1.o source2.o source3.o -o prog2
$ ./prog2 [to run the prog2 program]
sources:
perez.cs.vt.edu/cs2704/transparencies/how-to-compile.pdf
compiling single C++ source codes in fedora
Well, after dealing with .devel packages and other things, I finally know what packages I need to easily compile a C++ source code and run it in Konsole/Terminal.
Now you need these packages to be able to compile C++ sources in a Fedora 8 system.
You can copy/paste this code into your Konsole/Terminal session:
yum install gcc gcc-c++ compat-libstdc++-33 compat-libstdc++-296 compat-gcc-34 compat-gcc-34-c++
simply the packages are as follows:
-GCC (GNU Compiler Collection)
-GCC-C++ (C++ compiler for GCC)
-other ones are some compat libraries which I don’t exactly know what they do!
so now, if you want to compile a C++ source code named prog1.cpp, you do this in your Terminal session:
cd /where/c++/source/is
g++ prog1.cpp
this will now give you an executable file called a.out which you run it by typing “./a.out” in Konsole/Terminal. But if you want your executable to have a name, like prog1.out, then you add this to the previous command:
-o prog1
now your command would look like this
$ cd /where/source/is
$ g++ prog1.cpp -o prog1
now you just type ./prog1 and your program will run smoothly. If your source has some problems, GCC will let you know about them.
Good luck on compiling your C++ sources!
sources:
perez.cs.vt.edu/cs2704/transparencies/how-to-compile.pdf
New Computer arrived!
Tuesday, I got a new desktop finally. After turning it on, The next restart was loading up fedora installation disk! hahaha. Also I realized that “not responding”s I got on my laptop, were not because of my hardware, but because that it ran ‘windows’ on it (I didn’t have that problem with linux though). Anyway, so far from the first day of ’school off’, I was able to learn some C++, and develop a simple, konsole (read console) program that calculates the area and circumference of square, circle, rectangle, and triangle. Well, I added a ‘help’ section today and probably I’m gonna add some other stuff to it. Anyway, let’s see how it goes for the rest of ’school off’s!
how to use fedora rawhide
I recently understood how to install and use fedora rawhide which is currently Fedora 9 rawhide. Although I warn you that it’s solely for development purposes and NOT for users and day to day use!
now, here’s how you can get to rawhide and test and report as much as you want:
1. Go to Add/Remove Software > Edit > Repositories
2. Put a check mark beside “development” and click “close”
3. Go to terminal and type:
$ su -
password:
# yum update
4. now it will check for update which are now development updates.
5. Restart your computer and you’ll be in rawhide
However, I warn you again of the dangers of being in rawhide. Because it’s a development platform, things might break!
Enjoy your time in rawhide
some GNOME 2.20 screenshots
BOOM! after having a little bit of trouble with installing openSUSE, finally I gave up (not as in completely) on that and got back to “my” fedora 8
I set it up differently this time. With totally new look! another thing, I’m using Gnome again. Just for some time. Just for a change. Needless to say, I’m now passionately waiting for KDE 4 finally release. Although I wanted to build it myself, I don’t have the knowledge to. So, I’m currently satisfied (not really) with testing it in a virtual machine. Actually that was why I tried to install openSUSE at the beginning. So here’s some screenshots from my current Gnome desktop.
echo icon theme
compiz enable
wallpaper: “frog” @ vladstudio.com
fedora 8 step-by-step install guide
So, today I was writing a “guide” for my friend to install Fedora 8 easily and safely on a virtual machine. And I thought I would just copy-paste it here for other people interested in trying out Fedora to benefit. Here it is. Just some notes on behalf of this “tutorial”:
-I used x86 structure as example. If you are familiar with what do x64 and x86 mean, you can use x64 structure.
-I thought virtual machine would be a better approach for new people so I used virtual machine here. If you don’t want to use virtual machine, just go straight to “installing Fedora 8″ and ignore other parts. And also if you’re not using virtual machine, on #20, select “remove all LINUX partitions and create the default layout” NOT ALL PARTITIONS!!!
====== Preparation for Install ======
1. Download Fedora-8-i386-DVD.iso from
ftp://ftp.cica.es/fedora/linux/releases/8/Fedora/i386/iso
2. Go to http://virtualbox.org/wiki/Downloads and download an x86
copy of Virtualbox (VirtualBox Binaries > for windows hosts)
and click on “x86.”
3. Install VirtualBox.
====== Setting up a virtual machine ======
4. Run VirtualBox
5. Click on “New” on top left corner.
6. Click on “Next”
7. Type the name of the virtual machine (in this case “Fedora 8″)
on the bottom choose “Linux 2.6″
Click on “Next”
8. Allow a specific amount of Ram to your virtual machine.
9. On this page, you have to select a virtual harddisk to be
used by the virtual machine. Click on “New”
10. Click “Next”
11. Select “Dynamically expanding image” and click “Next”
12. Choose the amount of space you want virtual machine to use.
Default is 8.00 GB. Click “Next”
13. Click “Finish”
14. Click “Next”
15. Click “Finish”
16. Double click on the newly created virtual machine.
17. On the first start, it will ask you the location of CD/DVD
you want to use. Choose the path for your downloaded
fedora-DVD.iso and click “Finish.”
====== Installing Fedora 8 ======
18. On the menu that appears, highlight the first option and
press TAB and enter this command:
floppy.allowed_drive_mask=0 clocksource=acpi_pm
don’t forget to press Space before entering this code.
Press ENTER
19. Click “Next”
20. On 5th page, it asks you about what you want to do with
partitioning. Select “Remove all partitions and create
the default layout.” and click “Next”
21. Click “Next”
22. Choose your time zone and click “Next”
23. Type your “root password” Choose something fast-to-type
and click “Next”
24. Click “Next” again.
25. And another “Next”
***Now Fedora 8 is installing. After rebooting, it will ask you
some questions regarding your settings and account. After
that, you’re ready to use Fedora 8.
Good Luck
another slippage! KDE 4 schedule
Yesterday I was checking out the schedule for KDE 4 release and I noticed ANOTHER SLIPPAGE IN KDE 4 SCHEDULE! It’s now going to be release on JANUARY 11th which is quite loooooooooooong time. Oh that is disastrous. However, I understand that they are working on it to meet the expectations of the KDE community, but still! Also, the worse part is that Fedora project doesn’t provide the packages for KDE 4.0 desktop! openSUSE does but fedora project doesn’t. >:|




