Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Want to develop components but new to C++ (Read 6694 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Want to develop components but new to C++

Hi,

I'm interested in developing components for foobar2000. I have no experience with C++, but I learn quick when it comes to programming languages.

I've got Visual Studio 2008, but I don't know how to use it or even where to start. I downloaded the SDK and foo_tutorial, but they expect you to actually know how to use Visual Studio, which I don't. So I'm wondering if there's a guide that will help me get started with Visual Studio and the foobar2000 SDK, or if any of you can write one.

Thanks

Want to develop components but new to C++

Reply #1
As you say you have prior programming experience, working through a good book like Thinking in C++ will probably not be that painful.
C++ is a quite unforgiving and quirky language, which takes many years to learn properly.
The bare minimum you need to understand to write a component is how to inherit from a base class properly, what templates are and how they work, and a fair bit of Windows API if you plan on making anything with an UI.
There's a HTML page in the SDK zip, which covers the overall concepts of the foobar2000 API as well.
Stay sane, exile.

Want to develop components but new to C++

Reply #2
Thanks, Zao. But the code is quite straightforward, and I usually learn best from simple trial and error, reading from other code, etc. I only really need to know how work with Visual Studio to get me started.

Want to develop components but new to C++

Reply #3
Very well then.
Open the SDK-test solution, add a new empty DLL project inside the foobar2000 directory, rightclick the project and add dependencies to the assorted foobar2000 and pfc projects.
Then rightclick the project and pick properties, add ../shared/shared.lib to the "additional dependencies" under Linker -> Input, and optionally set the output directory to the fb2k components directory or a subdirectory of it.
Change the runtime library in C++ -> Code Generation to the non-DLL one for your build configuration.
Add your source files to your project and off you go.
And oh, there's separate project properties for Debug and Release. Make sure you change both.
Stay sane, exile.

Want to develop components but new to C++

Reply #4
Thanks, I guess. I'll try that.

Want to develop components but new to C++

Reply #5
Open the SDK-test solution


I'm also new to Visual Studio and C++, but having some experience with other languages I'd like to give it a try. Unfortunately after downloading and unzipping the foobar SDK I can't find any such file. Where am I wrong?
I'm late

Want to develop components but new to C++

Reply #6
Open the SDK-test solution


I'm also new to Visual Studio and C++, but having some experience with other languages I'd like to give it a try. Unfortunately after downloading and unzipping the foobar SDK I can't find any such file. Where am I wrong?


Alright. I found an answer here.
I'm late