View Full Version : Newb to Linux Programming, Need Help
January 14th, 2008, 04:59 AM
I am trying to make the switch over to Linux when it comes to programming. Being only a beginner programmer myself, I have quickly become lost. I can write code in Geany just fine. When I get to compiling, I can't figure out how to compile by command line, and when I compile through Geany, I get a .o file that I can't do anything with. I can't exactly do much programming if I can't compile my programs, or run them.
I am working with C++ at the moment, but will move to working with C when I set up a PSP Dev environment.
January 14th, 2008, 06:31 AM
Here is a link to a starting point with the command line.
C/C++ app building is a two step process compiling and linking. The output file of the compiler have a .o extension for object code. These are not executables, but are meant to be fed into the linker which will generate the executable. Most modern gui's will have a build command that will let you do both compile and link in one command.
January 14th, 2008, 06:19 PM
Alright, so is there also a way to compile source code into a Windows binary in Linux, or do I need to dual boot for that?
January 15th, 2008, 01:39 PM
Some compilers allow you to compile object files for other platforms, these are generally referred to as cross-compilers.
GCC uses ELF, while Windows uses something else. So you may need to invest some time looking for a new compiler.
The problem with porting code over Operating systems is that the libraries are different. Generally with standard libraries such as math, algorithm etc this is not an issue.
But when you are talking about graphics and other sophisticated operations then these tend to be less standardised and highly variable over differing operating systems.
January 18th, 2008, 03:45 AM
Well, if cross platform libraries such as Allegro and SDL are used, there shouldn't be much of a problem... theoretically...
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.