Stupid is a relative term =)
The command line is for interpreting commands, which usually are
executable programs on your file system. These are typically entered
on the keyboard by the user, but can be stored in files (often called
scripts). The C programming language is a compiled language, meaning
that the entire sequence of the program needs to be worked out in
advance. Programming in C usually involves creating a number of files,
and then invoking a separate compiler/linker program on each file to
build a new executable from these files. Once built, the new program
can then be run. On Linux, GCC is a popular C compiler/linker.
The command line, usually Bash under Linux, will not be able to run
your C code directly. You will need to write the program and then
compile it. The reason why #include appears to work is that # is the
start of a “comment” on many common command line interpreters.
Comments are ignored. When writing a script (a bunch of commands in a
sequence stored in a file) it can be useful to write descriptive text
detailing how the script works. Obviously, we don’t want the text to
be interpreted, or it would produce errors. So having a comment syntax
allows for script writers to write arbitrary text and to know that it
will not be misinterpreted by the environment. When you enter #, the
command line ignores everything else on the line after the #. Try it
yourself: write # followed by any text you want, and see what happens.
The underlying issue though is that you cannot manually initialise
SDL. SDL is initialised on a per-process basis, so even if you did
write an application in C that initialised SDL, it wouldn’t help. What
you need to do is either:
a) Get on to the Qemu authors, and ask them to produce a more
desciptive error (remind them to use the function SDL_GetError() when
building their error string).
b) Make the necessary modifications to the Qemu source yourself.
From the sounds of things, option (a) would probably be the best for
you at the moment. When we get a more descriptive error (there are
many reasons SDL_Init() can fail) we might be able to help diagnose
Don’t worry if some of the above doesn’t make too much sense, most of
it is a very simplified overview of what is going on.On Fri, Aug 22, 2008 at 12:31 AM, Mike McKnight - OETX wrote:
Yes. I’m new to Linux, am I doing something stupid?