Guest
Unregistered
|
|
Posted: May 20 2005,03:47 |
|
Try the gcc1.dsl extension, which contains gcc, g++, make, and the standard header files. You may not be able to compile source packages that depend on libraries other than libm / libc standard because the header files of these other libraries are not included in DSL nor in gcc1.dsl. You will have to retrieve these header files, place them somewhere, and use the -I (that is, "dash eye") option to append the location to where gcc/g++ will usually search.
If you are compiling something simple ("Hello, world!"), try the tcc (tiny C compiler) that comes with DSL. But instead of doing #include <stdio.h>, you will have to do #include <tcclib.h>. Also, you will have to inspect the header file /usr/lib/tcc/include/tcclib.h to see if all the functions you need are declared. If not, you will have to declare the functions explicitly in your program.
For example, no math function is declared. So if you want to use the sin() function, you should have the following line in your program:
double sin(double x);
and then compile your program with the -lm (that is "dash ell em") option. You can do this for any function that is not declared in tcclib.h but is known to be in the ANSI C standard libraries.
|