Author Topic: [SOLVED] Help setting up BASS for MS Visual Studio 2019  (Read 624 times)

NeoFahrenheit

  • Posts: 5
Hi, how are you guys doing?

I'll start building a very simple music player for Windows using C/C++ which later I'll work on a GUI using wxWidgets, but I have no idea how to setup the library the right way.
I have checked YouTube, Google, Stack Overflow, the official documentation and this very forum. I could not find anything, sorry if I missed something.

Could you guys help me with this?
I'm still a newbie and I am very lost.  :'(

I have tried building the solution file "bass.dsw" inside the "C" folder, but I don't know what to do with the results.
I've also tried putting the whole "C" folder inside the Debug folder in my MS projetc. Later, I included the "\Debug\C\bass.h", but I could not run a example code because some unreferenced functions definitions or something.

Thank you and sorry for my english!
« Last Edit: 25 Jul '19 - 17:00 by NeoFahrenheit »

Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #1 on: 23 Jul '19 - 12:24 »
The BASS.DSW solution file is for use with the old Visual C++ 6. With more recent Visual C+ versions, you should use the BASS.SLN solution file instead. Note to run the examples, you will need to first copy the BASS.DLL file to the C\BIN folder.

NeoFahrenheit

  • Posts: 5
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #2 on: 23 Jul '19 - 16:08 »
The BASS.DSW solution file is for use with the old Visual C++ 6. With more recent Visual C+ versions, you should use the BASS.SLN solution file instead. Note to run the examples, you will need to first copy the BASS.DLL file to the C\BIN folder.

Hi, thanks for the asnwer.
I'm still stuck! :'(

Well, I downloaded the bass42.zip, extracted the C folder, put the selected bass.dll in the "bass_dll.png" in C:\bin and went back to the C:\ folder to run the bass.sln project. Build - Batch build - Select All - Build.
After that, I moved the entire folder to my \Degub folder and tried to run a example code. I've put a file with some part of erros in the attachments.

Thanks for the patience.
« Last Edit: 23 Jul '19 - 16:15 by NeoFahrenheit »

Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #3 on: 23 Jul '19 - 16:59 »
Those error messages indicate that the BASS.LIB file isn't being linked. See the project's "Additional Dependencies" option.

When I said "C\BIN" folder, I meant the sub-folder in the BASS package (where the pre-compiled example EXEs are) rather than creating a "BIN" folder on the C drive. Please try extracting the entire BASS24.ZIP package to a new folder, then copy the BASS.DLL from that folder to the C\BIN sub-folder, and then load BASS.SLN in Visual Studio. Visual Studio will do a "One-way upgrade" on the solution/projects, and after that you will be able to modify/build/run the examples.

NeoFahrenheit

  • Posts: 5
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #4 on: 23 Jul '19 - 22:00 »
Sorry, it stills don't work.
I could run a few examples opening from the projects in the folder I created to extract bass21.zip, but I want to start a empty project to only add the functions I need.

I tried to add the path to "Debug\C" in the Addicional Library Directories (Linker -> General) in MS Visual Studio, but I still found the same issues when copyng and pasting some example code in my own project.

I could make a video about my process, if that helps.


Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #5 on: 24 Jul '19 - 14:34 »
If you're getting the same error messages as in your earlier post, that means it still isn't finding the BASS.LIB file. That needs to be included in the linker's "Additional Dependencies" setting. You can either provide the full path there or also include the path in the "Additional Library Directories" setting. Note there are different BASS.LIB files for 32-bit and 64-bit, so make sure you use the right one for each platform.

NeoFahrenheit

  • Posts: 5
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #6 on: 24 Jul '19 - 20:39 »
Hmm, I was going to try Allegro5 and I remembered how easy is to set it up for MS Visual Studio trough the NuGet Package Manager. Out of curiosity, I typed "bass" there and found several results. The top option is BASS(v.2.4.12.1) and BASS.NATIVE(v.2.4.13.10). I installed the BASS and now I just have two erros(see attachment). I also got the same result messing arround in dependency settings on MS Visual Studio.

The code I'm using is the bass21.zip\c\basstest\basstest.c

I think I'm getting closer.  :)


Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #7 on: 25 Jul '19 - 13:58 »
Setting the Linker/System/SubSystem option to "Windows" rather than "Console" should fix that error. The BASSTEST example (that you're using as a starting point) is a desktop app rather than a console app.

The warning messages are due to the source code being C but being compiled as C++, which has stricter typing. You need to cast the realloc function return value to the type of the variable that's receiving it, or use a C++ vector instead if you like.

NeoFahrenheit

  • Posts: 5
Re: Help setting up BASS for MS Visual Studio 2019
« Reply #8 on: 25 Jul '19 - 16:59 »
Thanks for the answer and the patience. That change to desktop app did the trick, but the warnings remains, tough.

Well, the problem is solved!
Now I'll look in the documention for how to start.

If you know even a basic tutorial, I'm taking it!

Thanks very much for your help, Ian;D