I've been trying to use the gcc compiler without success.

Asked by Francisco Assis dos Santos

Motherboard : Intel Dual Core
Operational System : Linux (Ubuntu )

Problem:: I have been trying to compile a small C training Source Program , without success , and I've always been informed that there are neither input files nor any other files or directory to be processed. I am afraid I'm making a repeateadly mistake. So, I describe as follows, the way I'm trying to compile my program: gcc capote.c -o tulipa. My C program is written as follows:

                    #include <stdio.h>

                     main ()
                     {
                         printf ( " Tentando escrever com a linguagem C" );

                       }

I hope these informations are good enough to furnish you some clues about the problem. Thank you very much for the valuable concern in helping us.

<email address hidden>

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-defaults Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Did you install the build-essential package?

Revision history for this message
Warren Hill (warren-hill) said :
#3

Ignore post #2 should have read...

Open a terminal CTRL+ALT+T Enter

make sure you are in the same directory as the source file and enter
-------------------------------------------------------------------
ls -la; gcc -o tulipa capote.c
------------------------------------------------------------------

Post all the output here

also main should return an int. I doubt this is the reason for your problem though you could try this modified code

-----------------------------------------------------------------------------------
#include <stdio.h>

int main (void)
{
    printf ( " Tentando escrever com a linguagem C" );
    return 0
}
------------------------------------------------------------------------------------

Not a fix but the full error messages may indicate what's going wrong

Can you help with this problem?

Provide an answer of your own, or ask Francisco Assis dos Santos for more information if necessary.

To post a message you must log in.