Menu

Compiling the C code with tcc (WINDOWS)

Anonymous
2017-06-27
2020-03-12
  • Anonymous

    Anonymous - 2017-06-27

    The documentation states: To compile X11-Basic programs, you need x11basic.lib, libgfx.lib, and xb2csol.h e.g. I cannot find the x11basic.lib file. Do I need to build the library. If so, how?
    Thanks, I like this Basic.

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-07-06

    Yes, you need the x11basic.lib file. This file can be compiled out of the X11-Basic sources and is (unfortunately) not included in the WINDOWS-Package. If you want, I can put it in the files section. But maybe you do not want to use binary files, which you have not compiled yourself.
    BTW: I have never compiled anything on a WINDOWS system myself. So I cannot help you here very much, but I would be interested If you can find out how to do it (e.g. with tcc). It should be possible, since I do it all the times on a linux system.

     
  • Anonymous

    Anonymous - 2017-07-20

    Markus,
    Yes, Please put the x11basic.lib file in the files section. I will also create some instructions how to build these on Windows and share with the group. I have never compiled anything on linux / BSD mostly because I don't have one of those systems...yet. So far, I have had no problems building programs using the byte code compiler on Windows XP.

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-07-21

    OK, x11basic.lib is now there. It is made from the latest (blooding edge) version of X11-Basic. I hope that this fits your version.

    BTW: It is made the following way out of the sources on a Ubuntu 17.04 host:

    cd src/
    ./configure
    make x11basic.lib
    

    I would first try to compile the example sources in
    examples/c-usage/
    which comes with the source package of X11-Basic. They are made for compiling and linking under linux, but it should work similar way on WINDOWS. You probably will also need the header file x11basic.h, but this is definetely included in the source package.

    The compilation could then be done with the following command from a Terminal window:

    tcc -DWINDOWS example.c -o example.exe x11basic.lib libgfx.lib libgmp.a lapack.lib libusb.a blas.lib f2c.lib -lSDL

    Also SDL.dll is needed, but it should be already there, when you have installed the normal X11-Basic-WIN-Package.

    The libgfx.lib libgmp.a lapack.lib libusb.a blas.lib f2c.lib files should be available from publically available sources in the internet. If you cannot find them, I can also provie my copy of them. Maybe a .dll version ofthem will also do, but I have never tried.

    Good luck,
    please let us know if and how it worked.

     
  • Anonymous

    Anonymous - 2017-10-04

    I got side-tracked in another project. I have some time now and ready to give this a go. Thanks for the x11basic.lib and instructions. I will let you know what I come up with.
    Thanks,
    James Gant

     
  • Duke Normandin

    Duke Normandin - 2020-03-08

    I want to compile X11-to-C code with TCC, but again the x11basic.lib file is missing. Where can I get it please? I'm on a Win10 box. Thx

     
  • Markus Hoffmann

    Markus Hoffmann - 2020-03-12

    Hi Duke, OK, I see, its the WINDOWS Version. Have I really again not put it into the package?
    So I am going to upload a recent version to the files section. SOrry for this.

     
  • Markus Hoffmann

    Markus Hoffmann - 2020-03-12

    Well, I have no good idea. I would put it to the Folder with the other files (xbc.exe).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.