News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Building error

Started by ramana, September 05, 2012, 02:43:48 PM

Previous topic - Next topic

ramana

On building getting error:
Building Ram.exe.
POLINK: error: Unresolved external symbol '__penter'.
POLINK: error: Unresolved external symbol '_WinMain@16'.
POLINK: fatal error: 2 unresolved external(s).

When i use:
for ( j = 0; j <= (3–i); j++ ){
getting below on same above line:
E:\tech\bobbleSort.c(18): error #2036: Invalid character: '\x2013'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ')' but found '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found '-i'.
E:\tech\bobbleSort.c(18): error #2048: Undeclared identifier '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found ')'.

CommonTater

#1
Quote from: ramana on September 05, 2012, 02:43:48 PM
On building getting error:
Building Ram.exe.
POLINK: error: Unresolved external symbol '__penter'.

This one is easy ... go into Project -> Project Options -> Compiler and uncheck "Enable hook function call"

Quote
POLINK: error: Unresolved external symbol '_WinMain@16'.

Are you building a gui program or a console program?

For a console program...
Project -> Project Options -> Linker -> Subsystem = Console.

For a windows gui program...
Add WinMain() as your entry proint function. 
Details at help -> Contents -> Appendix -> Program Startup, the main and WinMain functions.

Quote
When i use:
for ( j = 0; j <= (3–i); j++ ){
getting below on same above line:
E:\tech\bobbleSort.c(18): error #2036: Invalid character: '\x2013'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ')' but found '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found '-i'.
E:\tech\bobbleSort.c(18): error #2048: Undeclared identifier '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found ')'.

The error causing this is most likely a missing brace higher up in your program.
To give you a proper answer we will need to see your source code.

TimoVJL

Quote from: ramana on September 05, 2012, 02:43:48 PM
When i use:
for ( j = 0; j <= (3–i); j++ ){
getting below on same above line:
E:\tech\bobbleSort.c(18): error #2036: Invalid character: '\x2013'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ')' but found '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found '-i'.
E:\tech\bobbleSort.c(18): error #2048: Undeclared identifier '-i'.
E:\tech\bobbleSort.c(18): error #2001: Syntax error: expected ';' but found ')'.
Change '–' to '-'.
May the source be with you

CommonTater

Quote from: timovjl on September 05, 2012, 04:10:34 PM
Change '–' to '-'.

WOW... nice catch. 

Maybe I need new glasses...  :D