How to compile in DSLForum: Other Help Topics Topic: How to compile in DSL started by: kwjake Posted by kwjake on May 20 2005,01:52
How do I compile programs in DSL? What do I need?Plz help! Posted by Guest on 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. Posted by kwjake on May 20 2005,03:57
so where can I get the libm and libc at? How do I know which ones I need? I already have gcc (I think). When I try to compile somthing, I get:
Thanks for the help ! Posted by clacker on May 20 2005,12:18
kwjake, you're trying to compile tuxnes, right? You need to get the gcc1.dsl, the dsl-dpkg.dsl, and gnu-utils.dsl packages.Most programs can be compiled using the following three commands: ./configure make sudo make install If the program is graphical, you will need the X developement libraries as well. Since tuxnes is graphical, get these libraries. You can get them using apt-get, which is in the dsl-dpkg.dsl package also in the repository. You set your /etc/apt/sources.list file to unstable from stable, and the run apt-get:
If that worked, you're ready to try compiling again. If it didn't, you needed to load the gnu-utils package first. Try the command ./configure --help to get some information on the available options. I used these options and it worked:
|