Good day Guys
I am currently busy with C IO funtions getchar/putchar however ive been unable to execute any program after compiling it,I have to admit im guilty for not blogging this from the begining.
First of all ive compiled:c:\djgpp\bin\student\input output>gcc my_char_input.c -o my_char_input.exe -lm
the resut in CMD:c:\djgpp\bin\student\INPUT~1>
then I will go to rename the source file to my_char_input.exe to create an executable format of the file or was this suppossed to be done by the compiler?
if I proceed and run the file executable file it generates an error for example:c:\djgpp\bin\student\INPUT~1>my_char_input.exe
than it will give an 16 bit MS-DOS Subsystem:C:\windows\system32\cmd.exe - my_char_input.exe The NTVDM CPU has encountered an illegal instruction. Choose close to terminate the Apllication.
please help I really need help learning to execute programs in C.
Thanks in Advance.
Sly
2 replies to this topic
#1
Posted 31 January 2012 - 10:58 AM
|
|
|
#2
Posted 31 January 2012 - 11:35 AM
sly said:
Good day Guys
then I will go to rename the source file to my_char_input.exe to create an executable format of the file
then I will go to rename the source file to my_char_input.exe to create an executable format of the file
You "create" file named as executable file.
Your compiler created executeble file with name "my_char_input.exe"
You ordered to do it yourself:
"gcc my_char_input.c -o my_char_input.exe"
#3
Posted 31 January 2012 - 12:47 PM
You will need to post the program so that we can see why its causing the problem.
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









