ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a C++ program that runs on Windows XP (written using Borland C++ 5.02) but i am required to use Linux (Redhat 9.0) as the platform ; being a newbie to linux i have several questions.
I know for Linux we have built in C and C++ compilers (gcc and g++)....my main frustration is the interface i have to work with in Linux. Does anyone know of any freeware graphical compiler that i can use with Linux?
Also my code contains statements(functions and headers) that are not part of standard C++ , like outportb() fucntions to access ports ; if i am using the g++ compiler how can i use it to see what functions and headers are available/recognised in the compiler......does the [I]man[/1] command work with the g++ compiler too? Is there any way in which i can browse the compiler to see what help features are contained in it just like i can use the Help menu bar of Borland.
If you know of any freeware Linux C++ compiler,preferbly one that can be used to make GUI's as well.....plizzzzzz do let me know....
g++ can be used to make GUI's, but in linux, unlike windows, the GUI is not a standard part of the windowing environment. That's to say that in Windows you can include macros or functions or graphical tools to create a GUI in the compiler because you know every windows user will have the necessary libraries/DLL's installed to use the GUI you create; in linux this isn't so as GUI's can be created in Motif, wxWindows, gtk, Qt, Tk...you can't include support for ALL of those!! There are tools to help you though... Glade helps create GUI gtk applications, and there are similar tools for Qt and Tk.
Personally I use only vim for programming. Anything else is unnecessary.
KDevelop probably comes with your distribution, so you probably won't
have to install it manually or even compile it (whatever you have
downloaded).
If you are using SuSE, install it via YaST. If you are using RH, Mandrake or any other distributions, there are quite likely similar installation tools.
You need KDE installed and working, of course.
I personally dislike KDevelop, because although it's pretty close to the
MSVC GUI (even with Intellisense) it creates far too many files in your
project, and just like MSVC tends to keep you in the dark about what is
happending "under the hood". I use Kate and makefiles instead, learning curve probably is slightly steeper but you'll be more portable afterwards,
and are more likely to understand what you are doing instead of just
having dumbly learned to press the proper buttons.
You may want to take a look at GTK. If you stick to hard coding your GUI
port rather than creating it graphically (you won't be able to use your
Borland code 1:1 under any linux environment, anyway), you'll be off well
with GTK because it is really simple to program, there are good tutorials,
and it's really free (different from KDE, which is based on QT, which be-
longs to Troll Tech).
For your os api port, may I suggest you write some c++ os abstraction
class, something like
unsigned long C_abstraction_layer::_mymmtime(){
unsigned long result=0;
#ifdef _WIN32
result=timeGetTime();
#endif
#ifdef __linux__
timeval gtod_now_time;
gettimeofday(>od_now_time,0);
result=(gtod_now_time.tv_usec-gtod_start_time.tv_usec)/1000;
result+=(gtod_now_time.tv_sec-gtod_start_time.tv_sec)*1000;
#endif
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.