Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: C language compiler and GUI

  1. #1

    Default C language compiler and GUI

    Sorry for my few questions I ask in the last time.

    As part of my moving to Opensuse as my main OS, I'm looking for c/c++ compiler that looks/do the same as visual studio software.
    I did search the forum and found some names like Eclipse CDT.
    I want a graphic interface that will work like visual studio with all the colors and spaces.
    first question: which software is the best to do the job?
    second question: how do I install it and use it?

    Thank you very much for your helpful help. Opensuse is a really good OS. Untill now, I'm inlove with it.

  2. #2

    Default Re: C language compiler and GUI

    On 2013-02-28, triger772 <triger772@no-mx.forums.opensuse.org> wrote:
    > Sorry for my few questions I ask in the last time.


    No problem. You probably should have posted this in the programming/scripting subforum though as you might have had a
    better response.

    > As part of my moving to Opensuse as my main OS, I'm looking for c/c++
    > compiler that looks/do the same as visual studio software.


    You are confusing a compiler with an IDE (or Integrated Developer Environment). The Microsoft compiler (mcc) is part of
    the visual studio sofware but there is a lot more on top in addition to a compiler (such as a code editor). In Linux you
    have choice, and using any one compiler does not lock you into your choice of IDE. But if you looking for c/c++ compiler
    that works well with Linux, then a good starting point is gcc.

    > I did search the forum and found some names like Eclipse CDT.


    The Eclipse suite of software is popular among the free various IDEs. Other popular examples are Netbeans and KDevelop.
    I cannot recommend any IDE in particular because I am not sufficiently familiar with them. I dislike IDEs and would
    recommend anyone learning to code in Linux to avoid them because they make you lazy and lock you into their way of doing
    things which it seems Visual Studio has done to you . All you need is a text editor (such as kate or gedit, although I
    already find those too fancy!) and a compiler.

    > I want a graphic interface that will work like visual studio with all
    > the colors and spaces.


    I am not familiar with MFC implementations in Linux. Personally, I would avoid them like the plague, but you may have
    your reasons.

    > first question: which software is the best to do the job?


    It depends what are trying to do. There is no one best. If you talking about compiling c/c++, I'm sure gcc will do fine
    for you. If you insist on using an IDE, then you have to experiment with the different ones you are interested in,
    because (like KDE vs GNOME) it's just a matter of personal taste.

    > second question: how do I install it and use it?


    To install gcc, just `sudo zypper in gcc'. To install an IDE, it depends on which one, but generally they are very easy
    to install. IIRC Eclipse just requires the lastest Java Runtime Environment and you just run the binary directly from
    the download.

    > Thank you very much for your helpful help. Opensuse is a really good
    > OS. Untill now, I'm inlove with it.


    `Helpful help'... hmmm . Based on your confusion, it looks like you are a beginner. I strongly suggest you read the
    opening chapters to Zed Shaw's `Learn c the Hard Way' http://c.learncodethehardway.org/book/ .

  3. #3
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: C language compiler and GUI

    Quote Originally Posted by triger772 View Post
    Sorry for my few questions I ask in the last time.

    As part of my moving to Opensuse as my main OS, I'm looking for c/c++ compiler that looks/do the same as visual studio software.
    I did search the forum and found some names like Eclipse CDT.
    I want a graphic interface that will work like visual studio with all the colors and spaces.
    first question: which software is the best to do the job?
    second question: how do I install it and use it?

    Thank you very much for your helpful help. Opensuse is a really good OS. Untill now, I'm inlove with it.
    I don't think Linux can produce dlls like visual studio
    Try geany.

    Code:
    su -
    zypper in geany* gcc gcc-c++
    You can also use eclipse.
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  4. #4

    Default Re: C language compiler and GUI

    I read all what you posted and thanks for all the information.

    I did install the gcc and I know that to write a C code I only need a notepad or text editor like kwrite. But I want an interface which it can marks errors like variables that I didn't declare or make spaces between blocks.
    For example:
    .
    .
    .
    int arr[5];

    a[1]=5;

    I want an application which can marks a[1] with red because it not recognize. this way I can find errors faster.
    In addition, in blocks, the automatic space (or tab) make the code easier to read. I don't want to make this space every time by myself.

    This is way, but not all reasons, that I prefer a software and not to use a text editor and compiler.

    I install the kdevelope but I get an error. When I will be at home I will post what error I get. I think it something about it can't find "git".

    In general, when I have to work on a complex code, or with more than one file (headers and etc) it more easier to have an application.

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: C language compiler and GUI

    On 2013-02-28 23:16, triger772 wrote:

    > This is way, but not all reasons, that I prefer a software and not to
    > use a text editor and compiler.



    When I code I use pascal (not C), and I do use an IDE, in this case
    Lazarus. Yes, I do like IDEs like you. I have a list of possibilities
    for you to try, taken from my notes:

    > jedit jEdit is a cross-platform programmer's text editor written in Java.
    >
    > Anjuta (Gnome) C, C++, C#, Java, Perl, Python, Shell.
    > KDevelop Ada, C, C++, Database, Fortran, Haskell, Java, PHP, Pascal, Perl, Python, Ruby, Shel
    > probado en pascal, compila y ejecuta :-O
    > Eclipse The Eclipse Platform is designed for building integrated development
    > environments (IDEs) which can be extended by custom plugins.
    > eclipse-jdt This package contains the Eclipse Java development tools, a
    > full-featured Java development environment.
    > eclipse-cdt The CDT is Eclipse's C/C++ Development Tooling project. It is an
    > industrial strength C/C++ IDE that also serves as a platform for others
    > to provide value added tooling for C/C++ developers.
    >
    > geany * is a lightweight cross-platform GTK+ text editor[2]
    > based on Scintilla and including basic Integrated
    > Development Environment (IDE) features.
    >
    > Ultimate http://www.ultimatepp.org/



    Search the scripting-programming forum here, the subject came up not
    more than 3 months ago.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))

  6. #6
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: C language compiler and GUI

    Quote Originally Posted by triger772 View Post
    But I want an interface which it can marks errors like variables that I didn't declare or make spaces between blocks.
    For example:
    .
    .
    .
    int arr[5];

    a[1]=5;

    I want an application which can marks a[1] with red because it not recognize. this way I can find errors faster.
    In addition, in blocks, the automatic space (or tab) make the code easier to read. I don't want to make this space every time by myself.
    Does this look good ?
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  7. #7

    Default Re: C language compiler and GUI

    As you can see there are a number of different preferences as to how to code. Just beware of too-prescriptive suggestions since as I said, choice of which editor/IDE is very much a matter of personal taste. I think as Carlos seems to suggest, it's a good a idea to try more than one. After finding a few you like, choose your favourite, and then stick with it. I just recoil at the thought of Pascal coding! I bet Carlos used Delphi/Kylix in a another life .

    Quote Originally Posted by triger772 View Post
    I read all what you posted and thanks for all the information.

    I did install the gcc and I know that to write a C code I only need a notepad or text editor like kwrite.
    If you're in GNOME, I'd recommend gedit but you would probably find kedit and kwrite a bit basic in KDE - try kate (which is used by kdevelop). As you can see there are a very large number editors/IDEs out there:

    Comparison of text editors - Wikipedia, the free encyclopedia
    Comparison of integrated development environments - Wikipedia, the free encyclopedia

    I said beware of prescriptive suggestions, but for advanced coders (with the notable exception of Linus Torvalds) the best two text editors are Emacs and Vim (and their derivatives). For you, I would say don't use either for now. They are for when you don't worry about highlighting undeclared variables.

    Quote Originally Posted by triger772 View Post
    But I want an interface which it can marks errors like variables that I didn't declare or make spaces between blocks.
    Of course such errors would show up during compiling, so you are talking about dynamic syntax highlighting write coding. My natural answer to this is `how could you possibly contemplate using a variable before declaring its type in C/C++??? ' Good editors support syntax highlighting and code indenting (very important for Python). Try different ones (and bear in mind you often need to install plug-ins for the more basic editors for code-specific features).

    Quote Originally Posted by triger772 View Post
    I install the kdevelope but I get an error. When I will be at home I will post what error I get. I think it something about it can't find "git".
    I can confirm that it installs and complains that git isn't installed when you run it. This is clearly a dependency missed in the kdevelop4 rpm. You can corrrect the problem by installing git (e.g. `sudo zypper in git').

    Quote Originally Posted by triger772 View Post
    In general, when I have to work on a complex code, or with more than one file (headers and etc) it more easier to have an application.
    This is a common misconception. The more complex your coding project, the simpler you'd want things to be otherwise it's doomed to failure. You have to test each module (cpp + hpp pair) separately before integrating them into a complex project. Bear in mind you don't have to code everything in C/C++, even if C/C++ forms the bulk of your work.

    If you like the Qt framework (which is used by KDE) and really want to use an IDE, then you may like to look at Qt Creator (sudo zypper in qt-creator). It supports all the things you are looking for. For example, for your code:

    Code:
    int arr[5];
    a[1]=5;
    ... highlights the second line by underlining with red with the warning `expected a declaration'. I'd personally hate that but as I said it's very much up to personal taste .

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: C language compiler and GUI

    On 2013-03-01 11:56, flymail wrote:

    > with it. I just recoil at the thought of Pascal coding! I bet Carlos
    > used Delphi/Kylix in a another life .


    Right. Rather its predecessors - Turbo/Borland Pascal. :-)

    I also coded C for a living, but again, with the Borland IDE. I'm not
    used to GCC. So yes, I also love good IDE's ;-)

    Hey, I also had to keep some Basic code! :-)

    >> But I want an interface which it can marks errors like variables that I
    >> didn't declare or make spaces between blocks.

    >
    > Of course such errors would show up during compiling, so you are
    > talking about dynamic syntax highlighting write coding. My natural
    > answer to this is `how could you possibly contemplate using a variable
    > before declaring its type in C/C++??? ' Good editors support syntax
    > highlighting and code indenting (very important for Python). Try
    > different ones (and bear in mind you often need to install plug-ins for
    > the more basic editors for code-specific features).


    If the IDE can point you to some errors before the compile phase, you
    save time. On the other hand, it can be a nuisance triggering before you
    end typing :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))

  9. #9

    Default Re: C language compiler and GUI

    On 2013-03-01, Carlos E. R. <robin_listas@no-mx.forums.opensuse.org> wrote:
    > On 2013-03-01 11:56, flymail wrote:
    >
    >> with it. I just recoil at the thought of Pascal coding! I bet Carlos
    >> used Delphi/Kylix in a another life .

    >
    > Right. Rather its predecessors - Turbo/Borland Pascal. :-)
    >
    > I also coded C for a living, but again, with the Borland IDE. I'm not
    > used to GCC. So yes, I also love good IDE's ;-)


    Haha! I admit to having used the Borland's C++ IDE (*blush*) on a professional basis (to interface with COM objects - I
    couldn't bring myself to use MSVC++). In fairness, it was an incredible IDE but it seems that it's latest descendent
    (Embarcadero Studio) is a step in the commercial MS-centric direction and therefore probably doomed to failure by
    obscurity.

    The best thing (at least for me) about bcc was it's companion assembler TASM. Not only did support Intel syntax (gcc's
    gas' AT&T notation is horrible although apparently Intel notation can be emulated using the .intel_syntax directive),
    but it supported object-oriented assembler. Anyone know of an intel-convention objected-oriented 64-bit assembler?

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: C language compiler and GUI

    On 2013-03-01 13:38, flymail wrote:
    > On 2013-03-01, Carlos E. R. <> wrote:


    >> I also coded C for a living, but again, with the Borland IDE. I'm not
    >> used to GCC. So yes, I also love good IDE's ;-)

    >
    > Haha! I admit to having used the Borland's C++ IDE (*blush*) on a professional basis (to interface with COM objects - I
    > couldn't bring myself to use MSVC++). In fairness, it was an incredible IDE but it seems that it's latest descendent
    > (Embarcadero Studio) is a step in the commercial MS-centric direction and therefore probably doomed to failure by
    > obscurity.


    What a pity.

    For some time they also ported Delphi to Linux, but they abandoned soon.
    The product was lacking, but the idea had followers so that slowly the
    Lazarus project was born and has many followers.


    > The best thing (at least for me) about bcc was it's companion assembler TASM.


    Yes, very nice one, too. Fast as all their things, easy to use.

    Me, what I loved most was the integrated debugger on all their IDEs,
    saved my backside several times. It had a feature by which you could run
    a very small debugger in the target computer, linked via serial port to
    another computer that was running the full fledged debugger IDE. It was
    MsDOS times, small memories, so small footprint on a debugger could make
    all the difference.

    I missed all that when coming to Linux... But then, I'm not paid to code
    anymore, so i haven't really investigated in earnest.


    For this thread subject: those Borland IDEs were wonderful. They make
    the life of the programmer easier. IMO, similar products in Linux are a
    Good Thing™ to have, specially if we want people to port their products
    to Linux.

    > Not only did support Intel syntax (gcc's
    > gas' AT&T notation is horrible although apparently Intel notation can be emulated using the .intel_syntax directive),
    > but it supported object-oriented assembler. Anyone know of an intel-convention objected-oriented 64-bit assembler?


    No... sorry.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •