You are not logged in.
hi
i wrote a hello world example in c language and i want compile its.object file is created but not created executed file.please write me what command i need and a little hello world in c to test.
thanks
Offline
Please show us what you have so that we can see if your syntax etc is correct. are you getting and runtime errors - if so, post them.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
i write this cod
#include<stdio.h>
int main()
{printf("hello world");
return 0;
}
and my command:
gcc file-name.c
then gcc creat out put file whiteout creating object file and i add executable license to file and run correctly.
but why object file not created??
Offline
and what command for creating executable file from object?
Offline
for cpp code what command to this works i need?
Offline
It seems you need to learn more about the basics of C. I would recommend getting a good book and starting from there.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
no i was programming in windows and good programming but i am a new linux user.and now want to complate migration to linux.thanks for instructions.
Offline
For C++, use 'g++' instead of gcc
Offline
gcc some.c -o some
Offline
A good way to do this is build a simple makefile containing just the following 2 lines:
CC=gcc
CFLAGS:=-ggdb -std=c99
The second line is optional and you may have other preferences. The -ggdb option adds debugging information for the GNU debugger, gdb; and the -std=c99 allows a program that is compliant with the C99 standard to be compiled. Name this file 'Makefile' and place it in the same directory as your source code file (i.e. hello.c). Then just type
$ make hello
Offline