Thread: compiling and executing issue with lcc win32

  1. #1
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110

    compiling and executing issue with lcc win32

    Hey everyone,

    Here'sy problem, i installed lcc win32 some time ago on a Win XP system and now i want to compile something, my source looked oke, as i pressed ctrl-f5 which is compile and execute, if needed update everything the console application pops up and says return code -1 and thats all for the rest nothing else the window closes after i hit a button.

    Now if I run the program after compiling it only and run it out of the directory ( thats without using anything that has to do with lcc win32 compiler ) the console application works fine...

    Thats my first problem, i tried to check and see if it was one kind of compiler setting but in vain.
    If anybody experienced this before please help me out on this one since switching from compiler to windows explorer is not really a fast thing to do

    Second problem i encountered just now is that after entering this code ( a simple code since i wanted to check if the previous discussed matter was still there after changing some compiler settings )
    Code:
    #include <stdio.h>
    
    int main ( ) {
    
    	printf(" is it working ? \n");
    
    	return 0;
    	}
    With this code the compiler is giving me the error "Entry point("main" function) is not defined. Of couurse its not compiling anything.
    Before i would never have this problem ( i used Borland compiler before ).

    I thought the info that ill give you guys next might be usefull to help me, heres what i select when i do "create new project"

    DEFINITION OF A NEW PROJECT ( window )
    options:single user
    type of project: console application

    Then i get the question:
    Would you like to use the wizard to generate an application skeleton? I then press NO

    Then i add a new source file to project

    COMPILER SETTINGS
    no preprocessor defined
    debug support level: generate debug level info
    language extension: ANSI-C
    warning level: normal
    type of output: console application.
    Well i hope all this info should do it...

    Thanks in advance,

    Ganglylamb

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    1. http://faq.cprogramming.com/cgi-bin/...&id=1043284385

    2. Works fine for me. You may want to download the latest version of LCC.

  3. #3
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    1. http://faq.cprogramming.com/cgi-bin...5&id=1043284385

    2. Works fine for me. You may want to download the latest version of LCC.
    1.
    I dont think you got my question right or i dont know on whqt you replied of course i know that a console app might disappaer after compile and execute after fully executing and to prevent there are indeed different ways to prevent that one #include <conio.h>
    getch(); is one and then system("pause"); is one which i dont like

    2. I already have the latest lcc version....

    I dont know which question of mine you answered but in any case a wrong question...which i never asked anyway...
    Last edited by GanglyLamb; 08-08-2004 at 05:20 AM.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    FFR.

    Fdisk, format, reinstall.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Fdisk, format, reinstall.
    Really ??
    Well i know i had to do this one a long time ago but the problem is that im having some problems with my laptop and to reinstall win xp will take me again a couple of days to get my display adapters and everything fixed the way it is now... long story but i just explained in short now...

    Anyhow that means ill shift my programming from my xp system back to my old win98 system which is already getting dusty....

    Thx anyway .

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I was joking...sort of. I'd just try reinstalling your compiler first to see if that fixes it. You may also want to Google the error you're getting. But since I'm not lcc tech support, I'll leave that to you.

    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    I was joking...sort of. I'd just try reinstalling your compiler first to see if that fixes it. You may also want to Google the error you're getting. But since I'm not lcc tech support, I'll leave that to you.
    Oh oke, luckily i had not started yet with your FFR procedure .

    Yeah ill try to check some things with their own support, but i thought since there are some ppl who are very used to lcc i thought let me just try here.

    Anyhow thx again, ill look into the whole thing again.

    Ganglylamb.

  8. #8
    Registered User
    Join Date
    Dec 2004
    Posts
    2
    hi,
    My name is alessandro, I'm a begineer in C programming.
    I've installed now the lcc-win32 comppiler and I have tried to compile the same code with the same error about main (I'm using xppro)
    do you have find a solution for the error?
    may you help me?
    [email protected]

  9. #9
    </life>
    Join Date
    Oct 2004
    Posts
    83
    Why not have a look at mingw developer studio. You may find it alittle more user friendly.

    Mingw Developer Studio
    Microsoft is merely an illusion, albeit a very persistant one.

  10. #10
    Registered User
    Join Date
    Dec 2004
    Posts
    2

    soltion for compilation

    Hi, I've found a forum with the answer to compile problem.
    The error is related on how the compiler works.
    (our file is obviously correct DO NOT CENCEL IT!!! just save ).

    note: The compiler return an error if you create a new project with a blank file.

    In order to avoid the error create another PROJECT and then select the already created .c file then compile it

  11. #11
    The C-er
    Join Date
    Mar 2004
    Posts
    192
    Yes, I had this problem too, I just couldn't remember how I fixed it!

    I still use LCC though, it does have a few rough edges, but not enough to make me change.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Project compiling, but not executing correctly
    By sansuki in forum C++ Programming
    Replies: 1
    Last Post: 03-30-2005, 06:40 AM