Thread: New to C need help with definitions

  1. #1
    Registered User
    Join Date
    Jan 2015
    Posts
    4

    New to C need help with definitions

    I am a embedded electronics hobbyist that is needing to learn C to use the new 32 bit chips from microchip more efficiently. I know embedded assembly, embedded basic, VB ,HTML and have pasted simple embedded C programs together. Most microchip programs are written in C now and I might as well learn it and windows C while I'm at it. I see that code:blocks is the only one that will do windows and PIC chip programming. I like this because I will only have to learn 1 ide for both and less clutter. My question is I'm a little confused as to what people have been recommending to go with it as compilers and libraries? A lot are saying I can't make windows programs without adding GTK, MINGW, and wxWidget. I'm figuring MINGW is a backend compiler. I think wxWidgets is a library but I can't figure out what GTK is? Is it a compiler or libraries? And why do I need this or the others?
    I think, correct me if I'm wrong here, that I can make windows programs with just code:blocks but I would have to build my own libraries or code for windows apps?
    If anyone has a better option for someone that is coding PIC chips and making windows programs with the same ide let me know.
    Thanks.

  2. #2
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    Technically you can create programs in Windows using purely the windows API. Really the main thing GTK/wxWidget is providing you is a cross-platform GUI framework that has lots of builtin data structures and useful objects etc.. as well as a myriad of plugins out there that can be easily integrated into an existing project.

  3. #3
    Registered User
    Join Date
    Jan 2015
    Posts
    4
    Quote Originally Posted by nonpuz View Post
    Technically you can create programs in Windows using purely the windows API. Really the main thing GTK/wxWidget is providing you is a cross-platform GUI framework that has lots of builtin data structures and useful objects etc.. as well as a myriad of plugins out there that can be easily integrated into an existing project.
    When you say " Windows API " you mean a console only application, right? I need to start programming GUI programs with push buttons, sliders and etc etc.
    Ok GTK and wxWidget are libraries I can use to keep from having to write so much code?

  4. #4
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    No I mean GUI programs. Look here for example: Dialog Box Overview (Windows)
    These days .NET framework is really the more commonly used on Windows environments, which is actually somewhat portable to *nix environments these days, with Mono and the other project it's now merging with.

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    The Windows API (a newer incantation of what was known as the win32 API) is an API for using services offered by Microsoft windows operating systems. Those services include specialised console functions (distinct from what is meant by the term "console output" in standard C), GUI, mutexes, threading, registry editing, etc. It is not just GUI.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  6. #6
    Registered User
    Join Date
    Jan 2015
    Posts
    4
    Ok, I just looked up windows API . Those are basically wrappers I can call from within my program. Right? I can call those wrappers from within code:blocks?

  7. #7
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    That depends on what compiler you're using within Code::Blocks. Code::Blocks is just an IDE - it is not a compiler, nor is it an operating system.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  8. #8
    Registered User
    Join Date
    Jan 2015
    Posts
    4
    Think I will stay away from API's right now to keep from getting confused and learn that later. Plus I see they are mixing C++ with C on the lower level functions and that would really confuse me. I used to embed assembly into basic when writing chip code. That worked a lot of times in speeding up a function but other times airplanes fell from the sky and the robots went out and killed the neighbors. So I keep it one language in a program now, from the top down. Thanks for the help guys !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 23
    Last Post: 03-07-2011, 05:28 PM
  2. #definitions
    By errigour in forum C Programming
    Replies: 1
    Last Post: 11-11-2010, 08:24 AM
  3. Declarations and definitions in C
    By jack1234 in forum C Programming
    Replies: 8
    Last Post: 12-17-2007, 11:24 AM
  4. Help on definitions
    By GAMEPROJOE in forum C++ Programming
    Replies: 2
    Last Post: 07-18-2003, 01:59 PM
  5. definitions?
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 06-16-2002, 09:59 PM