BASS 2.4.8.1 Header

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

BASS 2.4.8.1 Header

Postby MOD » Jan 16, 2012 13:39

I've translated the latest header of BASS 2.4.8.1

@sir_mud: would you upload it to the fb-header-project. Would be great to have new header with fbc 0.24.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: BASS 2.4.8.1 Header

Postby sir_mud » Jan 18, 2012 8:19

Thanks, it's in git now. I generated a def from the included dll since there wasn't one included.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Postby MOD » Jan 18, 2012 10:40

Sorry, I forgot about the def file. Thank you.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Postby MOD » Jan 20, 2012 22:13

Update:
-new example with Creative Commons Attribution-Noncommercial-Share Alike 3.0 License example sounds

They could be included as examples for the fbc-download.
(Same link - see first post)

sir_mud: the version you've uploaded differs from my version. theres at least one problem in line 420:

Code: Select all

type RECORDPROC as cdecl function (byval as HRECORD, byval as const any ptr, byval as DWORD, byval as any ptr) as BOOL

You've mixed 'cdecl' and 'function'.

'extern "C"' seems wrong as well.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: BASS 2.4.8.1 Header

Postby Lachie Dazdarian » Sep 15, 2012 21:16

When I try to compile a program that uses BASS among other things, I get duplicate definitions errors on these two lines:

Code: Select all

#define MAKEWORD(a,b) Cast(WORD, ((a) And &hFF) Or ((b) Shl 8))
#define MAKELONG(a,b) Cast(DWORD, ((a) And &hFFFF) Or ((b) Shl 16))

Any ideas?
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Postby MOD » Sep 15, 2012 21:36

And why this is a bass header fault? :P
Seems like windows headers also use these definitions in windef.bi.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: BASS 2.4.8.1 Header

Postby Lachie Dazdarian » Sep 15, 2012 21:44

I'm not saying it's anyone fault, just trying to compile a program in Windows, and the compilation halted in bass.bi.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Postby MOD » Sep 15, 2012 21:50

If you swap the include lines, it will stop on windef.bi.
You could delete the lines from bass.bi because you don't need them for every bass usage.
TJF
Posts: 3502
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: BASS 2.4.8.1 Header

Postby TJF » Sep 15, 2012 23:09

@Lachie Dazdarian:

Consider to use a NAMESPACE-block around one of the headers.
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Re: BASS 2.4.8.1 Header

Postby Gonzo » Sep 15, 2012 23:30

thats why we have #ifdef #endif =)
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Postby MOD » Oct 06, 2012 14:05

The current compiler 0.24 comes with mixed up files as I see. I don't know where that .dll.a comes from and the header uses extern blocks which are also a problem.
I recommend to use my files from the link in the first post.
dkl
Site Admin
Posts: 3210
Joined: Jul 28, 2005 14:45
Location: Germany

Re: BASS 2.4.8.1 Header

Postby dkl » Oct 14, 2012 17:21

I fixed FB's BASS .def file, so the import library should be correct in the next FB release.

Checking the bass.dll and the original bass.h header, it exports stdcall functions without @N suffix. FB's bass.bi header was changed to use Extern "windows-ms" to match this, however the import library was not adjusted accordingly. In the past the bass.bi header used @N suffixes, and the import library provided the symbols with @N too, and then linked them up with the corresponding symbols without @N from the bass.dll, by using dlltool's --kill-at switch. Now that the header itself uses the correct mangling (no @N suffix), the import library doesn't need to do any tricks anymore.

By the way, the import library still seems to be required: I tried letting ld link against the bass.dll directly, but it failed with a "file format not recognized" error. This worked with other DLLs for me in the past, but apparently it doesn't like the bass.dll for some reason.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest