Converting BMax output files
BlitzMax Forums/BlitzMax Programming/Converting BMax output files
| ||
I would need to use ld to convert the BMax output executable on Linux(but it could be the same for win .exe) to object files. I think Linux executable that BMax outputs is a.out, but i need it to be .o Can someone suggest me the correct ld script, please? |
| ||
On windows, BM outputs .s and .o (see .bmx folder in the apps directory ... normally hidden in linux thanks to the . ) But what reason would need to do a manual linking? Beside creating so / dlls, which is prohibited by license (you need to aquire a special license directly from BRL) |
| ||
I'm not doing a dll. in a few days i'll release my work, if everything goes well. however it's not for library programming. i've just seen into the .bmx folder, and i saw that files. which one would i need to use? console. or debug.? console, right? and how could i disable automatic library linking? and, this is the final question, i've seen that into the .s file there is on the top "elf". so, is the file format outputted the elf one? |
| ||
I need to link a compiled blitz program to a c one, calling some functions i write into the bmax file into the c one. |
| ||
Use Import "myprog.c" if you want to link c code with your blitzmax project. You can't do it the otherway because blitzmax programs must have certain things initialised at startup like the garbage collector so if your c code has a main, you should rename it to cmain or whatever, import that function along with the above and call it from your bmx prog. see blitzmax/tmp/ld.tmp after you build your blitzmax program for an idea of what exactly is being linked to produce your executable. |
| ||
I saw. However i'm trying to call a bmax function from a c one, not a c function from a bmax program. |