Like Tree3Likes
  • 3 Post By AndrewHunter

Switching from MinGW to Pelles C, code breaks

This is a discussion on Switching from MinGW to Pelles C, code breaks within the C Programming forums, part of the General Programming Boards category; Hi, I'm moving to Pelles C after reading reviews about it here and elsewhere. I used MinGW previously and when ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    30

    Switching from MinGW to Pelles C, code breaks

    Hi,

    I'm moving to Pelles C after reading reviews about it here and elsewhere. I used MinGW previously and when I try compile my code with Pelles my code breaks.

    There are a series of errors so lets just start with the first one that occurs when I press "build":

    POLINK: error: Unresolved external symbol '_penter'.
    POLINK: fatal error: 1 unresolved external(s).
    I googled for this but everything I found was either not relevant, didn't help or wasn't clear enough for me to understand

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,157
    Did you add all your source files to the project? Are you relying on a library other than the standard library, or using non-standard components available through standard library headers?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    344
    Also make sure you've cleaned up all of the output files previously built with the old compiler. This includes object files and libraries as well as executable. Library and object formats can differ in subtle ways between compilers even on the same system. In this case, it could be that Pelles is looking for _penter while it's in a MinGW-compiled library and named penter or __penter or penter<mangled C++ nonsense>.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Hear.Me.ROAR View Post
    Hi,

    I'm moving to Pelles C after reading reviews about it here and elsewhere. I used MinGW previously and when I try compile my code with Pelles my code breaks.

    There are a series of errors so lets just start with the first one that occurs when I press "build":
    1) Is this pure C code... no C++? Pelles doesn't know C++, not even a little bit.

    2) Pelles C won't compile code unless you create a project... Click File -> New -> Project and follow the wizard. (Note you should probably make a copy of your source code in new folders and add it to your project from there)

    3) In Project -> Project Options -> Compiler check "Define Compatibility Names", "Enable Pelles C extensions" and "Enable Microsoft Extensions".

    4) Also put your text cursor on the offending keywords and press F1... if Pelles C knows it... it's in the help file.

    5) Also note the all non-C-99 functions in Pelles C libraries are prefixed with a single underscore... These are clearly identified in the help file, so you may have to adjust some of your code to suit.

    6) When in doubt... Read The Help File!
    Last edited by CommonTater; 08-11-2011 at 11:55 AM.

  5. #5
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    Quote Originally Posted by CommonTater View Post
    6) When in doubt... Read The Help File!
    I don't know where you get off telling people to read the help file and do their own research. Really, how rude.
    CommonTater, Prelude and Adak like this.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pelles C Temperature
    By uneasybbj in forum C Programming
    Replies: 4
    Last Post: 11-23-2010, 01:51 PM
  2. help debugging in Pelles C IDE
    By gaurav9991 in forum C Programming
    Replies: 3
    Last Post: 10-30-2010, 08:15 AM
  3. Getting the code after the preprocessor in MinGW
    By guesst in forum C Programming
    Replies: 1
    Last Post: 10-24-2008, 12:03 AM
  4. Need help compiling example code (MinGW and DirectX9)
    By scwizard in forum Game Programming
    Replies: 10
    Last Post: 07-25-2008, 11:43 AM
  5. my code breaks unique pointer rule?
    By George2 in forum C++ Programming
    Replies: 19
    Last Post: 02-17-2008, 03:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21