How to compile under DosEMU?

DOS specific questions.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: How to compile under DosEMU?

Post by dkl »

The synchronization between Github/SourceForge repositories is manual, and I forgot about it. I don't know whether it can be automated (especially in both directions).

The github repo is the one providing the IRC commit messages, by the way. SourceForge used to have some limitations on sending data out of the container/machine containing the git server...
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: How to compile under DosEMU?

Post by rugxulo »

dkl wrote:I've only ever tested DJGPP builds on Windows or cross-compiling from Ubuntu, but... what errors do you get? Is there a gcc compilation error on src/gfxlib2/gfx_paletteget64.c, or a linking problem later when compiling FB programs using the gfxlib?
I've never rebuilt FBC (yet). I am somewhat curious but not quite adventurous enough.

I did make a mini FreeDOS meta-distro (MetaDOS) hopefully meant to assist in things like this. For instance, according to this old post from counting_pine, it shouldn't be too hard, given the right tools. (Though MetaDOS is far from ideal, I'm not claiming perfection, but maybe it helps somehow.)
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: How to compile under DosEMU?

Post by rugxulo »

angros47 wrote:I first installed all the files in pth207b.zip, and then installed in the lib directory of DJGPP only the file libsocket.a from ls080b.zip (it can be found http://www.delorie.com/pub/djgpp/current/v2tk/).
Libsocket is from 2002, hence it's unmaintained and probably unwise to use here. GNU pth is dated 2007, so similar problem. I seriously don't recommend them. Don't expect them to be flawless. I know that the buggy DJGPP port of p7zip used to rely on it, but nowadays for that you can just use Juan's recent (re)port of FSU Pthreads instead, see here.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: How to compile under DosEMU?

Post by St_W »

@angros47:
Now, as the changes have been merged to the master branch, could you please update the build instructions in the wiki accordingly?
https://freebasic.net/wiki/wikka.php?wakka=DevBuildDos
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: How to compile under DosEMU?

Post by angros47 »

@rugxulo
I already tried that version, it doesn't work. At least not with current code. Feel free to try using it to replace the one I used, anyway, it is the main advantage of open source development, after all

@St_W
Done, I hope it is clear

Also, about the dynamic libraries, at the moment it works in a way slightly different than in Windows or Linux, and a small change is required in the example: dylibload requires the suffix ".dxe" to be added (since in dos there is not an official extension for dynamic libraries). And dylibsymbol requires to add the "_" prefix to the symbol loaded. It could be changed, to match the behavior of windows and linux, or it could be left in the current status and in the documentation the difference can be pointed out (it would just require a small change in the examples for dos)
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: How to compile under DosEMU?

Post by coderJeff »

There's probably a few other places that need to get updated in the documentation. Any other differences in use for Dylibload, Dylibsymbol,
Dylibfree, etc? Mostly the documentation just says that dynamic link libraries not available on DOS.
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: How to compile under DosEMU?

Post by angros47 »

There are a couple of differences: DyLibLoad requires to specify the extension of the file (so, dylibload( "mydll.dxe" ) instead of dylibload( "mydll" ) , if the library has extension .DXE). And Dylibsymbol will require an underscore character before the symbol name (dylibsymbol( library, "_AddNumbers" ) instead of dylibsymbol( library, "AddNumbers" ) ). So, code will need some small changes.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: How to compile under DosEMU?

Post by coderJeff »

That's cool. We just need to get it to the finishing line then. I you or any other DOS user can update the documentation, keyword pages, FAQ, etc, that would be so helpful. I don't have any current application for DOS build of fbc. I am only testing that fbc builds and passes test-suite under dos (actually go32 under win98 VM under win7-64).
Post Reply