VSTSDK and Visual Studio Express 2010 - c++

I am new to C++ and Visual Studio and have two questions:
Where do I need to put the VSTSDK so that VS recognizes it and I can use it in my projects?
Does anybody have some sample code for a VST host?

It doesn't matter where you put the VST SDK, as long as you tell Visual Studio. In Visual Studio, you can add any library and #include path, and that's what you'll need from the SDK.

I would also recommend checking out the Audacity Source Code for a VST hosting example. There used to be a great vsthost.cpp example on the web, too, but I can't seem to find it. =/

There are some few examples like, vsthost, vstboard, audacity.
vsthost is using asio only, the 2 others are using portaudio and portmidi.
vstboard is using Qt for gui, audacity uses wxwidget.
The problem is : what kind of host do you need (simple for one plug in ora complex one) Also, you should take a look at JUCE library which offers good features for all of that even if I would prefer the vstboard design (Qt + portaudio)
good luck

Related

Unable to use dll built with Rcpp package in Visual Studio [duplicate]

I am wondering if there was a workaround for using the R package Rcpp within a Visual C++ project within Visual Studio. According to the Rcpp FAQ, this is not possible. I also came across another R package called R.NET. Can this only work with C# but there seems to be no examples from within Visual C++? Is there another option for this that I am missing? Even if I am forced to work with C#, can anyone envision latency issues with this for a high frequency trading environment?
Thanks for any feedback
We address this very question clearly in the Rcpp FAQ (which comes as vignette in the package, is on the CRAN site and its mirrors, and on my website).
In short, Rcpp supports the exact same toolchain which R supports. And on Windows that is MinGW (the port of gcc to Windows) provided by the Rtools package for R.
R Core only support MinGW, and we do the same. If one could compile R with Visual Studio, things would be easier, but as Rcpp sits on top of R we are playing the hand we are dealt with.
So sorry, the answer is a "No" to Visual Studio.
The question is what you really want to connnect with what. If you want to use R within C++ Rcpp seems to be the wrong decision as it connects C++ to R (and not the other way round as your question implies.).
If you want to connect R to C++ and use Visual C++ for creating your C++ code only (instead of linking R to C++), you might want to check this recent blog post (found via R-bloggers.com). It tells you a possible way of doing so.
Visual Studio works just fine with Rcpp. Has done for years. I disagree with Dirk Eddelbuettel.
This is an important fact - For example, there are very important libraries (Intels MKL, QT graphics framework) which are actually not compatible with minGW.
I maintain a (patched and cut-down) fork of Rcpp on github (https://github.com/rohan-shah/Rcpp) suitable for compilation with Visual Studio with cmake. The patch is something like five lines, I believe.
Disclaimer: It's fiddly to use, and you have to know what you're doing. If you do know what you're doing though, I've done quite a bit of the work for you. See https://github.com/rohan-shah/mpMap2 for an example of how to use patched Rcpp with Visual Studio.

Xcode 5 plugins for C++ development

After switching from Visual Studio 2012 with latest Visual Assist to XCode 5 for C++ development I feel very unhandy. I cannot find the comfort of doing such things:
renaming
finding usages
switching back and forth between definition and declaration
changing function signature
inserting code snippets such as #ifndef A #define A /*here come header file*/ #endif
But I am sure that there are lot of C++ developer on Mac and of course there should be handy tools for them. Please advice what I need to install. What is the standard arsenal of C++ developer on Mac?
You can switch back and forth between definition and declaration with ⌘+Click on a function name.
You create Code snippets by dragging selected code to the right pane with snippets.
Here's better explanation: http://nshipster.com/xcode-snippets/
Unfortunatelly renaming only works with ObjC and C.
I didn't use VS so I don't know if my suggestions are what You've asked.
There really isn't a lot.
However, if you have to use Xcode, start here with a plugin manager:
http://alcatraz.io/
Personally I use the autocomplete plugin and the vim emulation to make my life better. Both installable via alcatraz.
Unfortunately the C++ refactoring totally sucks. I have Visual Studio installed via parallels and I'm popping back to that to do anything automated.
Top tip: Use Command-Shift-O for finding a file.
This also looks interesting (and is also installable via alcatraz):
http://codepilot.cc/

Does MinGW support MFC?

I have developed WinAPI applications using MinGW without problems. Now, can I do the same with MFC?
I'm just guessing here but I think you would need to buy a copy of Visual Studio to get a license to use MFC. MFC is not well known for its portable use of C++ either. If you are familiar with MFC, you might find the learning curve for Qt to be reasonable (which I use with MinGW). The MFC/MinGW route sounds very painful :)
You cannot. MFC stand for Microsoft Foundation Classes and Microsoft isn't good at supporting any other products than theirs.
You may try to compile MFC under MinGW if you have the source but the result is uncertain.

Challenge working with Visual Studio and VC++?

I have started working with C++ recently and am not comfortable with Visual Studio Development Environment and also I do not have proper understanding of MFC, Win32, ATL, COM Terminologies.
From example point of view, I had taken a simple C++ program to see how it works with Visual Studio Environment and I was having some issues to get that code up and running.
I would like to request if someone could point me to some online resources/books where I can get more understanding about Visual Studio Development Environment from C++ perspective and get some knowledge about MFC, Win32, ATL, COM Terminologies than it would be really very helpful to me.
Note: I have checked MSDN library and some related Microsoft sites but when I see HOW DO I kind of video tutorials they are more from .Net/C#/ASP.Net perspective but I am looking for some online resource for C++/VC++ perspective.
www.stackoverflow.com of course will have plenty of resources around if you look # the right tags
https://stackoverflow.com/questions/tagged/mfc
https://stackoverflow.com/questions/tagged/com
etc.
The Code Project is also a good resource for windows / C++ programming, here are a couple areas to start looking #:
http://www.codeproject.com/KB/MFC/
http://www.codeproject.com/KB/atl/
http://www.codeproject.com/KB/COM/comintro.aspx (via Andy in comments)
The classic book about Win32 is presumably Petzold's. Petzold's book is I think (I've never read it) mostly about GUI programming; whereas the other classic/recommended Win32 book, which is Richter's, is about 'system' (non-GUI) programming.
For learning COM, perhaps Essential COM? Some reviewers praise it, but some others reviews say things like "not for beginners"; but it's how I learned COM, and I found it thorough, low-level, and detailed. It assumes you know C++ (not COM) already.
IMO you don't need books about MFC if you already know C++ and the Win32 API, in which case the reference libraries are sufficient. Alternatively, some people recommend an MFC book like Prosise's.
I learned using Visual Studio IDE and MFC using the Scribble Tutorial. It was a step-by-step tutorial creating a simple MFC application. Unfortunately the tutorial was written for Visual Studio 6.0, and in the meantime almost all wizards and menus changed, so it's not applicable anymore.
The tutorial can be found in MSDN, here, though:
http://msdn.microsoft.com/en-us/library/aa716528(VS.60).aspx
The scribble sample source for Visual Studio 2008 can be found here:
http://msdn.microsoft.com/en-us/library/f35t8fts.aspx
Don't bother learning ATL, WTL, MFC or COM for now (or at all, really). Just use standard C++ for starters. If you want to write GUI programs, I recommend Qt, it is much easier and fun to use than any of the former APIs.
If you have trouble compiling Qt for Visual C++ you can download the entire Qt SDK and it comes with a C++ IDE called Qt Creator. It uses MinGW as a backend.

Excel files and C++

How i can read\export data within a C++ application to Excel files? I was found the xlslib project, but it only compiles with MingW on Windows. My target platform is windows (MVS2008)
You can try this commercial library http://www.libxl.com, it works with Visual Studio 2008 and doesn't require Microsoft Excel.
If you're stuck with unmanaged C++ and need to communicate directly with Excel you'll need the COM automation interfaces. See the MSDN article link text
If you want the expressive power of the new managed interop, I think you may need to wrap your C++ code in an interop dll.
On windows, you can also give a try to ExcelFormat lib.
http://www.codeproject.com/Articles/42504/ExcelFormat-Library
It doesn't require Excel installed, and it's very easy to use.