![]() ![]() I think the final step (object code to executable) isn't happening. Will return to this problem in a few days, when my mind is refreshed. That's possible and for a few days easily done. for the moment I will edit my source using Geany and compile and run using the terminal. Maybe (here, in Linux) object code is similar, but without an executable permission. Object code was an executable binary file when loaded into memory and the program counter set to the object code ran. Previously I wrote a lot of code in assembly language.ĭifferent processors. hello_world.o: cannot execute binary file: Exec format errorĪnd I don't understand the meaning of 'object code' in the context of linux. I change permission to executable (using Geany. I compile the code using Geany -> hello_world.o (object code). OK Trying this from a combination of Geany + ROX + Terminal I have just demonstrated that the C compiler works from the terminal. I can rename this executable to "hello_world" I can run "hello_world". Now to fiddle the system: in the terminal (the bash command line) I can compile hello_world.c : gcc hello_world.c works My working directory is: /mnt/sda2/bThings/Computing/C/tut/ (but I think this is irrelevant in this context) ![]() I suspect I have some-how switched the active something (I don't know what) - but I suspect you gave me a hint in your last para. I see corresponding object code and executable file. Using ROX I see the source: "hello_world.c". So the html "code" ran, but my C code does not. Light (browser) opened and I saw the web-page I made. Now, (5 minutes ago) I opened that html code and hit "F5". The code was called 'page.html' I did this while I following a tutorial on you-tube about using geany. One of the last things I did before the problem arose was to edit and "run" some html. I ran the program using a terminal window (I saw expected result).īelow, you will see the config files but I have one more observation. Got the C compiler from the uPupBB repository. Geany 1.29 (supplied with uPup)Įverything else is standard. Maybe that nobbled the process.Įnvironment is: uPupBB 19.03 on i3 CPU. hello // the pwd for the terminal is the directory where the source is found. I compile the source I can run the binary: eg #. However - outside, opening the terminal from the desktop - the compiled code runs. I the execute button no longer opens a terminal window. I did open edit > preferences > but took care in what I did (or so I thought). When I used the function keys to do the same thing - all worked as expected.īy this I mean I when I clicked the 'execute' gear icon a second terminal window would open. I used the icons provided to do this.Ĭompile, build, run. Yesterday I could compile, build and execute a program within Geany. I am learning the C programming language. Specs for my environment are below my signature.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |