Since fmod.bi is no longer supported and documentation is readily not available, I have switched over to bass.bi. I just spent several days replacing all the fmod.bi code and tried to compile for the first time with the following from the standard FB library (all from up to date Windows 10, FB 1.08):
#Include Once "gir\gtk-3.0.bi"
#Include Once "bass.bi"
And the error listing ballooned out with errors like:
Error4: Duplicate definition in "Type Atom as Word" (in windef.bi)
Error4: Duplicate definition in "Type Char as Byte" (in winnt.bi)
Error 20: Type Mismatch before ')' in const in ANSI!_NULL = Cast(Char,0) (in winuser.bi)
Plus lots and lots more of a similar vein.
gir\gth-3.0.bi works fine by itself, it was the addition of bass.bi that did the nasty deed.
So is there a simple solution? are the win***.bi part of FB or Bass.bi?
Thanks in advance for any help or workarounds.
Wally
Problem with gir\gtk-3.0.bi & bass.bi
Re: Problem with gir\gtk-3.0.bi & bass.bi
Similar symbol names are used in the winapi and in GLib, the libraries are incompatible.
You could use a namespace like
But the better solution would be replacing Bass by GStreamer, the GLib based alternative (that's cross-platform).
Regards
You could use a namespace like
Code: Select all
#INCLUDE ONCE "Gir\Gtk-3.0.bi"
NAMESPACE bass
#INCLUDE ONCE "bass.bi"
END NAMESPACE
Regards
Re: Problem with gir\gtk-3.0.bi & bass.bi
Thanks. Too bad I did not know before I spent the time converting fmod to bass.
I appreciate your help.
Wally
I appreciate your help.
Wally
Re: Problem with gir\gtk-3.0.bi & bass.bi
Bass is also cross-platform. The biggest advantage of gstreamer is probably its license, which also allows free commercial usage (while Bass is only free for non-commercial usage). And of course, as you already seem to use GTK, staying within the same ecosystem.
Re: Problem with gir\gtk-3.0.bi & bass.bi
I thought I would give putting Bass.bi into a namespace to see what happens so I could still use the code I wrote.
I now get lots of errors in bass.bi
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winerror.bi(3515) error 123: Symbols defined inside namespaces cannot be removed, found '__IN__WINERROR_' in '#undef __IN__WINERROR_'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1093) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_WNDPROC' in '#undef GWL_WNDPROC'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1094) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_HINSTANCE' in '#undef GWL_HINSTANCE'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1095) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_HWNDPARENT' in '#undef GWL_HWNDPARENT'
.
.
.
Seems #undef is not allowed in a namespace ??? seems strange.
Any way around this? What if I got rid of the #undef's in bass.bi and all the files #included from bass.bi. Does anyone see a problem with that?
Wally
I now get lots of errors in bass.bi
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winerror.bi(3515) error 123: Symbols defined inside namespaces cannot be removed, found '__IN__WINERROR_' in '#undef __IN__WINERROR_'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1093) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_WNDPROC' in '#undef GWL_WNDPROC'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1094) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_HINSTANCE' in '#undef GWL_HINSTANCE'
C:\FB\FreeBASIC-1.08.1-winlibs-gcc-9.3.0\inc\win\winuser.bi(1095) error 123: Symbols defined inside namespaces cannot be removed, found 'GWL_HWNDPARENT' in '#undef GWL_HWNDPARENT'
.
.
.
Seems #undef is not allowed in a namespace ??? seems strange.
Any way around this? What if I got rid of the #undef's in bass.bi and all the files #included from bass.bi. Does anyone see a problem with that?
Wally
Re: Problem with gir\gtk-3.0.bi & bass.bi
You could try to namespace GTK (it shouldn't have much #UNDEFs, and less files in the #INCLUDE-tree)
Code: Select all
NAMESPACE Gtk
#INCLUDE ONCE "Gir\Gtk-3.0.bi"
END NAMESPACE
#INCLUDE ONCE "bass.bi"
Code: Select all
#INCLUDE ONCE "Gir\Gtk-3.0.bi"
#INCLUDE ONCE "Gir\Gst-1.0.bi"
BTW:
GStreamer is integrated in GTK-4, so it's just one line like
Code: Select all
#INCLUDE ONCE "Gir\Gtk-4.0.bi"
Re: Problem with gir\gtk-3.0.bi & bass.bi
By chance I just found Gtk-4 binaries at
https://packages.msys2.org/package/ming ... 86_64-gtk4
They're based on ffmpeg (Gtk-4 is using either GStreamer or ffmpeg backend).
Regards
https://packages.msys2.org/package/ming ... 86_64-gtk4
They're based on ffmpeg (Gtk-4 is using either GStreamer or ffmpeg backend).
Regards
Re: Problem with gir\gtk-3.0.bi & bass.bi
I am not ready to learn gtk 4 yet. I will stick with gtk 3.24.14 for now. I just have to learn gstreamer and how to use it. It looks a lot more complex.
Thanks
Wally
Thanks
Wally