This is how I do it with DJGPP on FreeDOS https://github.com/markjolesen/fltkal/blob/master/doc/build.md#allegro-4
On Sun, Jun 27, 2021 at 3:51 PM Paul Dufresne via Freedos-devel <[email protected]> wrote: > > ---- Le sam., 26 juin 2021 18:20:36 -0400 Paul Dufresne <[email protected]> > I wrote ---- > >I now think that adding "external" before declarations in .h is the correct > >solution. > > >If they were not mark static already, it is that the value is expected to be > >shared (being global). > >The solution is *I now think* to add external, and have the real declaration > >in a unique place, like in main.c. > > > I can now confirm this is a change in GCC 10 ( from > https://gcc.gnu.org/gcc-10/changes.html ): > "GCC now defaults to -fno-common. As a result, global variable accesses are > more efficient on various targets. In C, global variables with multiple > tentative definitions now result in linker errors. With -fcommon such > definitions are silently merged during linking." > > More details in: > https://gcc.gnu.org/gcc-10/porting_to.html#common > > I am now realizing it can be tedious to rearrage the code to initialize stuff > only once. > -fcommon could allows us to do the bad thing for some time > > _______________________________________________ > Freedos-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freedos-devel _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
