Thread: Which compiler..??

  1. #16
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Perhaps I misunderstood... It's been a LONG day...

  2. #17
    Registered User
    Join Date
    Oct 2010
    Posts
    107
    Quote Originally Posted by CommonTater View Post
    It's ok... As I said. I prefer PellesC for lots of reasons... Believe me, if I thought there was a better C-99 package, I'd be using it.

    I've tried Gcc and DevC++ and frankly I was not impressed.
    The GNU compiler collection is quite nice in my opinion, but my only reference experience is with gcc and MSVC. DevC++ is an awful IDE made of pain.

  3. #18
    C-no_Ob Bennie98's Avatar
    Join Date
    Oct 2010
    Location
    Ledeberg, Ghent, East-Flanders, Belgium
    Posts
    49
    thx for the suggestion Salem, but for the moment I'm going to keep using Pelles-C. It does everything I want it to do and frankly I'm tired of installing C-compilers ^^ I've tried too many of them

    but thx anyway


    edit: @ QuadraticFighte: L0L @ awful IDE made of pain ^^

  4. #19
    C-no_Ob Bennie98's Avatar
    Join Date
    Oct 2010
    Location
    Ledeberg, Ghent, East-Flanders, Belgium
    Posts
    49
    Quote Originally Posted by CommonTater View Post
    One tip, that you may have discovered already... in the Tools/Options/Source, enable CallTips and put BrowseInfo on full. Then go into Folders and click the Brows Info button... You get some very nice screen tips as you're programming.

    Also there are a couple of PellesC specific #defines you may want to try...

    #define WIN32_DEFAULT_LIBS automatically includes Windows libraries when compiling.
    #define WIN32_LEAN_AND_MEAN avoids including nested include files.

    Glad you're enjoying it.
    thx for the info, but i checked and it was already on so I think we were both talking about the same thing... and when you define those libraries... how does he know where to get them? they aren't in the PellesC-folder... or he gets them somewhere in windows... if so.. where? I'm not grasping the total concept of programming yet... sometimes that bothers me a bit

  5. #20
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Bennie98 View Post
    thx for the info, but i checked and it was already on so I think we were both talking about the same thing... and when you define those libraries... how does he know where to get them? they aren't in the PellesC-folder... or he gets them somewhere in windows... if so.. where? I'm not grasping the total concept of programming yet... sometimes that bothers me a bit
    If you look in tools->options->folders you will find paths to the includes and libraries. This is the default setup for PellesC and it's good enough for most cases. Of course as you progress and begin creating your own libraries you can create your own folders in your project space and add them to these lists so you can index your stuff just like it's part of the standard library.

    Also if you have project level libraries --say a communications .lib that gets used in both client and server-- you can add the folder(s) to your project folders (project options in the project menu) and index them for that project only.

    For the standard windows libraries...
    C-99 allows a #pragma comment(lib: Library.nam) to be used to automatically inform the linker which libraries to use. PellesC has a macro #pragma lib() as well. I generally like the shorter form, even though it's not standard C.

    When you use #include <windows.h> it will search the "Includes" folders for the header file. But you would normally have to manually add the associated libraries to the linker's list in your project options.

    Some time ago Pelle (and a couple of his supporters) went into the windows headers and added the pragamas so that when you define WIN32_DEFAULT_LIBS and load a header you are also indexing the necessary libraries.

    For example in winsock2.h you will find...
    Code:
    #if defined(WIN32_DEFAULT_LIBS)
    #pragma comment(lib, "user32.lib")
    #endif
    Now please be aware this is neither standard C nor standard Windows... but it's just handy as all git when writing windows code. The libraries line in my linker panel, in project options, is typically blank... and it works perfectly.

    Coming from a Pascal background, where units and unit names had meaning, I was a lot confused over the fact that headers didn't connect to anything, filenames were totally arbitrary, libraries and objects didn't correspond with headers of the same name and so on. When I discoverd this feature of PellesC I was all over it. It very nicely got me over that transitional hump. Now, being a little further into C and beyond that initial confusion, I still find it to be a very handy convenience. It's one of those "What were they thinking" kind of things...

    I gather you're using version 6.50... This is in the "release candidate" phase right now. You probably should join the Forums ( Pelles C forum - Index ) and help in debugging for the final release version, which probably won't be too far away. There's a pretty good crew over there as well. (I've stayed with 6.0 because I'm mid-project right now but will update as soon as I finish)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  2. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  3. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  4. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM
  5. Bad code or bad compiler?
    By musayume in forum C Programming
    Replies: 3
    Last Post: 10-22-2001, 09:08 PM