LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   c++ compilers (https://www.linuxquestions.org/questions/linux-software-2/c-compilers-432532/)

metallica1973 04-06-2006 09:49 PM

c++ compilers
 
I currently am taking a class in C++ and object oriented programming. my class requires borland C++ compiler but I heard that linux has compilers like GCC. Can I use GNU's GCC instead of Borland C++ compilers and be able to pass the class?I am new to programming and would appriciate any comments

Electro 04-06-2006 10:21 PM

Yes, you can use gcc compiler. After you install the gcc compiler, install mingw. mingw makes binary files that can run on Windows while only using Linux.

IBall 04-06-2006 10:52 PM

There may be some differences between the Borland compiler and g++. However, since you are taking a beginning programming class, you should only be doing the basics, and only ANSI C++, so you shouldnt have any problems.

I hope this helps
--Ian

newbloggy 04-07-2006 01:32 AM

Though U can use GCC for using C its better for u to go thro the differences between GCC and Borland by surfing the net

timmeke 04-07-2006 02:31 AM

Gcc and Borland are 2 different compilers, so they may use different options. Compiling on Windows may also be different from compiling on Linux (ie different system libraries) or cross-compiling (like using Mingw to compile Windows stuff on a Linux box).

metallica1973 04-07-2006 08:53 AM

do you have any decent links for programming?

timmeke 04-10-2006 02:07 AM

For C++, Bjarne Stroustrup's book is the considered as "must have".

What do you want to know about programming in C++?

SquishyMarbles 04-10-2006 02:28 AM

metallica, I know in a lot of those first programming classes, you're programming inside of a GUI-based system, and you're not even writing make files and junk (those come in the second round of classes). If you don't really want to fiddle around with VIM or EMACS or something, writing out C++ in what's basically a fancy Windows Notepad, then writing makefiles and compiling like that, then maybe you should stick with the Borland stuff (if it is in fact the graphical, easy to use stuff)

gmcmaster 04-10-2006 02:32 AM

By the sounds of it, he'd be using the Free Borland Compilers to which there is no GUI anyway!?

SquishyMarbles 04-10-2006 02:53 AM

Maybe, but I was started out with Borland JBuilder (for Java), and I didn't really understand what a compiler was. =)

I was thinking thay maybe he had Borland C++ Builder, or whatever they may call it.

metallica1973 04-10-2006 09:36 AM

actually I read the cdrom readme.txt and it is just *.cpp examples. This is my first week in class so I guess of buying a Borland C++ I would prefer to use GCU GCC and take it from there and use mingw to compile stuff for windows. Here is a really stupid question, I just want to get a jump on the class so how would be able to open up a *.cpp file and begin to play with it? I know that I will learn this real soon in the book (online class) but I just wanted to through this out there.

SquishyMarbles 04-10-2006 10:11 AM

what OS are you using?

Regardless, just open it with a text editor, like VIM, or Notepad

metallica1973 04-10-2006 02:19 PM

The instructor has told me that I need to use Visual C++ so I guess I am going to have to use a windows machine unless there is an alternative in linux.

ronald-be 04-10-2006 02:30 PM

Hello Metallica,

One important remark : call the compiler with gpp instead of gcc or u will have plenty of mysterious error messages. If u want a library to program in X, consider Qt4 from Trolltech later on. For now it's too complicated, unless classes are making X programs from the beginning. I have Borland C++ version5 for use in Windows : very good stuff indeed !!!

Greetings,

Ronald

Electro 04-10-2006 11:18 PM

No need to buy Borland compiler because they give it out for free. Programs compiled with Borland depends on Windows even though it runs in DOS. Visual C++ is a bloated IDE because for a simple "Hello World" program takes up about a megabyte. You do not need Visual C++ for a beginning programming class.

If you use MinGW, the programs will run in DOS or Windows.

A beginning programming C/C++ class will not even touch GUI junk. I have taken a beginning programming C class. All what my instructor/teacher what me to learn is the syntax of the langauge.


All times are GMT -5. The time now is 02:41 AM.