Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
11 Feb '25 - 04:43
Home
Help
Search
Login
Register
Un4seen Developments Forum
»
Developments
»
BASS
»
Topic:
How to use BASS library with QTCreator?
Reply
Print
Pages: [
1
]
Author
Topic: How to use BASS library with QTCreator? (Read 2558 times)
Ironarrow
Posts: 6
How to use BASS library with QTCreator?
«
on:
5 Feb '13 - 11:35 »
Quote
Hi,
i am very new to your project and to C++ programming. I have started to build QT from the source (using this manual
http://qt-project.org/wiki/MinGW-64-bit
) and now I want to play a mp3 file with my application. A friend of mine told me from your library and now I am here.
I have written a simple test application which raise an "Segmentation fault" when I tried to run an function from the bass.dll. I have a 64bit mingw compiler and I downloaded the 64bit version of your dll from here
http://www.un4seen.com/forum/?topic=9038
In the constructor of my QT dialog I want to get the version of the DLL. But when I do the function call, I get the exception.
Code:
[Select]
if (HIWORD(BASS_GetVersion())!=BASSVERSION) {
I looked at the "c"-examples and tried to implement the call the same way. I have attached my test application. Maybe someone can find the error.
Thank you very much.
Regards,
Rainer
Logged
Ian @ un4seen
Administrator
Posts: 26254
Re: How to use BASS library with QTCreator?
«
Reply #1 on:
5 Feb '13 - 17:44 »
Quote
I have never used Qt or MinGW64, so I'm not familiar with what needs to be done with them, but do they give any errors/warnings when you build your EXE? If you like, you can upload your EXE, and I'll see if I can spot any problems with it.
Logged
Ironarrow
Posts: 6
Re: How to use BASS library with QTCreator?
«
Reply #2 on:
6 Feb '13 - 08:12 »
Quote
Hello Ian,
thank you very much for your answer.
I have attached the .o-files and the exe file. I get no errors or warning while building the EXE.
When the bass.dll is missing, the programm crashes direct on program start. but when the dll exists in the same directory like the exe file I can start the debugger and step to the function call "BASS_GetVersion()". But when I execute this command, the application terminates.
So I think the DLL will be referenced correctly.
Logged
Ian @ un4seen
Administrator
Posts: 26254
Re: How to use BASS library with QTCreator?
«
Reply #3 on:
6 Feb '13 - 16:30 »
Quote
I can't try the EXE as I'm missing some DLLs that it requires, but it appears to be importing the BASS_GetVersion function from BASS.DLL fine. For some clues on why it's crashing, please post the call-stack and registers from the debugger when the crash occurs.
Logged
Ironarrow
Posts: 6
Re: How to use BASS library with QTCreator?
«
Reply #4 on:
6 Feb '13 - 18:35 »
Quote
Sorry, my mistake. I have forgotton to add the QT-DLLs. But I have checked them. That where several hundred of megabytes.
I have attached all debugger output that I could find. I hope they are helpful.
Logged
Ian @ un4seen
Administrator
Posts: 26254
Re: How to use BASS library with QTCreator?
«
Reply #5 on:
7 Feb '13 - 15:53 »
Quote
That's strange. The backtrace appears to be saying that it's in the BASS_GetVersion call, but the address (0x0000000000403350) is still in the EXE rather than BASS.DLL.
It may be that MinGW64 doesn't support MSVC-generated LIB files (such as BASS.LIB), and you will need to generate a MinGW64-compatible import library, as described here...
http://sourceforge.net/apps/trac/mingw-w64/wiki/Answer%20generation%20of%20DLL%20import%20library
I haven't tested it myself, so I'm not sure if it will work, but here's a library that was generated using those instructions...
www.un4seen.com/stuff/mingw64-bass.lib
Logged
Ironarrow
Posts: 6
Re: How to use BASS library with QTCreator?
«
Reply #6 on:
7 Feb '13 - 16:44 »
Quote
Thank you very much. As soon as I tested the new lib file, I will give you a feedback.
Logged
Ironarrow
Posts: 6
Re: How to use BASS library with QTCreator?
«
Reply #7 on:
10 Feb '13 - 18:52 »
Quote
Hm ... sorry for the bad news, but with the new LIB file I have the same problem. :-(
Logged
Ian @ un4seen
Administrator
Posts: 26254
Re: How to use BASS library with QTCreator?
«
Reply #8 on:
12 Feb '13 - 16:38 »
Quote
That's a shame. Do you actually need to build 64-bit executables? Note 32-bit executables will work on 64-bit Windows too. If you're fine with 32-bit executables, then you could try MinGW instead. That definitely does work with the standard BASS.LIB file (from the Win32 BASS package), as the example EXEs are built with it
If you do need 64-bit, it looks like Qt can use Microsoft's compiler too, so perhaps you could try that.
Logged
Ironarrow
Posts: 6
Re: How to use BASS library with QTCreator?
«
Reply #9 on:
12 Feb '13 - 18:49 »
Quote
I can use the 32bit compiler, too.
But I have found an other compiler and I would like to test it. But the bass.def file is missing. Can you send it to me?
Logged
Ian @ un4seen
Administrator
Posts: 26254
Re: How to use BASS library with QTCreator?
«
Reply #10 on:
13 Feb '13 - 17:02 »
Quote
You can generate a DEF file from a DLL file using the "gendef" tool. Here are some details on that...
http://sourceforge.net/apps/trac/mingw-w64/wiki/gendef
Logged
oifii
Posts: 10
Re: How to use BASS library with QTCreator?
«
Reply #11 on:
2 Mar '24 - 13:39 »
Quote
for me, gendef.exe does not work on bass.dll. it creates an empty .def file. did you find a way to generate the .def file. I also need it in order to use dlltool.exe for generating libbass.a. I am also trying to link bass.dll using mingw.
Logged
Reply
Print
Pages: [
1
]
Un4seen Developments Forum
»
Developments
»
BASS
»
Topic:
How to use BASS library with QTCreator?