| | |
Programming under linux
Thread Solved |
it depends on your code, but as long as you use a compiler for xp / linux you should get your code to run on either with minimal changes.
•
•
Join Date: May 2008
Posts: 94
Reputation:
Solved Threads: 15
On linux once you have created the source of your program using console editors (emacs,joe etc) or desktop editors depending on your desktop type then it's ready for compilation.
On windows IDE's compilation is by a single click and it even allows you to execute the object within the IDE.
On most linux platforms provided gcc is installed then you can compile your source file.
example:
/*Assuming the file is in your home directory*/
g++ source_file.cpp
/*where source_file is the name of your file*/
The resulting output is a.out which is the default executable of any compilation unless otherwise.
/*Execute the object */
./a.out
/*Note the preceding dot indicating current directory */
Hope it helps!
Feel free to ask!
On windows IDE's compilation is by a single click and it even allows you to execute the object within the IDE.
On most linux platforms provided gcc is installed then you can compile your source file.
example:
/*Assuming the file is in your home directory*/
g++ source_file.cpp
/*where source_file is the name of your file*/
The resulting output is a.out which is the default executable of any compilation unless otherwise.
/*Execute the object */
./a.out
/*Note the preceding dot indicating current directory */
Hope it helps!
Feel free to ask!
Correct me if I'm wrong but I was under the impression that fork() creates a child process, not a thread. It basically creates a duplicate or clone of the parent process. You can then change the child process into any other process via an exec() command. If you want to create a multi-threaded program under Linux you would use posix threads. The difference between a thread and a process being, among other things, that threads share data (such as open files) and are much lighter on system resources in their use/creation.
•
•
•
•
Hi all
I want to write program in linux about
first come first served algoriyhm by using C++
but I don't know how to start???????????????
I know how to write the code in XP system.
what is the difference between programming in linux and xp?
Can anyone help?
The main difference from a programmers point of view would be the tools that you have available to you. Under Linux you have many of the same IDEs as Windows has: Eclipse, Sun Studio, NetBeans... I would suggest going into the "Add/Remove Programs" tool in your Linux distro and check out what they offer. You're no more than a few clicks away from a ton of different IDEs, compilers, and other programming tools.
![]() |
Similar Threads
- Linux Programming (Kernels and Modules)
- ebooks for c++ programming on linux (C++)
- c programming from linux command line (C)
- Programming in Linux? (*nix Software)
Other Threads in the *nix Software Forum
- Previous Thread: Partitioning for linux and windows.
- Next Thread: Running online application with xampp
| Thread Tools | Search this Thread |





