LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Guidance required for starting to program in Linux (https://www.linuxquestions.org/questions/linux-software-2/guidance-required-for-starting-to-program-in-linux-686824/)

Zack Alamy 11-28-2008 04:09 AM

Guidance required for starting to program in Linux
 
Hello,

I am a fairly confident programer in C/C++ but I have been programing in proprietary simualtion software environments (like OMNeT++, OPNET).

I am now supposed to make code changes in some Linux applications (like Mobile IPv6 for Linux) but i am finding trouble getting used to the Linux OS system. I may mention that i have been usign Linux, but just as a user but I do not have expertise or knowledge of Linux OS and/or how to interact with it.

I am therefore looking for guidance regarding the first steps that I must take so that i can start making code changes and compile them and check my results.

to be more specific, I am supposed to be workin on certain *.cc and *.h files of a certain source code which are located in a folder /user/linux/mipl-2.0.2/src. Ofcourse I have an idea as to what changes to make and where to make but i am lost when it comes to compiling and viewing the results...what important libraries to look for, how to set up the project in Eclipse, so that i can move easily through teh code......

I am sure all of the experts on this forum would have gone through the same problem and so i am hoping, wishing and lookign forward to generous comments, guidance and help to get me started to take the first baby steps towards programing in linux environment.

Looking forward

Zack Alamy

rylan76 11-28-2008 04:53 AM

Hmm never used Eclipse. I use emacs, GNU "autotools" and then makefiles...

I don't know the package you are working on, but usually, if you download a major Linux application source package, it is already "autotooled" (if I can call it that) and you then use the autotools to generate the makefile. You then call the makefile to compile the application.

E. g. something like this:

1. You download the source package for an application.
2. You untargz / untarbzip2 it to a directory.
3. In that directory, you do

./configure
make

to build the application. ./configure "calls" the autotools script 'configure.sh" that creates the makefile for you. "make" runs the make binary on the "Makefile" that the ./configure step produced, which calls the cc / cxx to compile the package.

4. You run the application executable - depending on the package, it might go to different locations - /bin of the source directory, or simply directly in the source directory, it depends.

E. g. to develop on that package, your sequence will then continue:

4. Edit the source file you want to edit, save it.
5. Run make to compile the "new" binary
6. Run the binary that is the product of your edited code

Hope this helps. Post again if you need more detailed info.


All times are GMT -5. The time now is 05:39 AM.