How do i include RVO2 library in Visual Studio? - visual-studio

I have been writing a code which uses SDL to render particles in Visual Studio. However, there does not seem to be any way to include RVO2 library:
http://gamma.cs.unc.edu/RVO2/downloads/ to Visual Studio. I have been able to include header files, but library file seems to be libRVO.a which Visual Studio is maybe not accepting. Also, there is no .dll file as was with SDL2 download.
So, I wanted to ask is there any way in which I can use RVO library in Visual Studio.
If not, I have another similar question...
I am using wsl(Windows Subsystem for Linux) and found that SDL cannot be run in it. I am able include RVO in wsl. So, can you suggest me a way where I can use both the libraries RVO and SDL2 simultaneously...

Related

How to link against Windows system libraries with CMake?

I am building a simple Windows application that needs to link against gdiplus and winmm.
Previously I was using
find_library(GDIPLUS gdiplus)
target_link_libraries(target ${GDIPLUS})
but CMake does not find the library when using the Visual Studio 2015 target with the Visual C++ Build Tools. According to the answer here I should probably drop the find_library and just use
target_link_libraries(target gdiplus.lib)
but I'm not sure if this will only work for Visual Studio or for example also with Cygwin.
So what is the correct (or best) way to link against Windows system libraries from CMake?
I have been looking to link with Rpcrt4.lib and this worked on windows
target_link_libraries(${"LIB_NAME"} rpcrt4.lib)

Compiling the opus-codec API library

First, going to be honest. I'm a c#/java-language-level dweller. So I have no idea about how to compile native-C projects such as opus.
I've tried doing it myself, and I've tried googling it. I simply need help compiling the opus-codec API (on Windows).
Once I have the library compiled, I'll build a wrapper for it's API.
While my searches have indeed found opus wrappers targeting my current project's language (c#), I can't find an up-to-date one. I don't know if it matters, but I need it for it's VoIP capabilities.
Sorry for my stupidity in the matter.
[UPDATE]
After compiling with Visual Studio 2010: Ultimate, I have a .lib library file. I need a .dll. I don't know what I'm doing. Help?
In a C project there is going to be some way to drive a build of all the object files, libraries, etc. Basically the same thing as maven build in Java, just with different tools. You will have to have the right tools if you don't.
On unix systems it's usually Makefile driven, running command line programs that compile and link the program or library that is being built. In GUI environments like XCode or Visual Studio, there are ways to run the build directly from the UI.
Looking at the source tree, there's a directory with a number of Visual Studio 2010 projects in it - https://git.xiph.org/?p=opus.git;a=tree;f=win32/VS2010
If you're using Visual Studio, loading that up and trying a build to see if it still works is where I'd start. Or perhaps have a look at Any way to do Visual Studio "project only" build from command line? or other questions that reference msbuild.

Build Macros in Visual Studio

I am having a look at Macros for building projects in Visual Studio. I am using a library nodejs that comes in various versions. It has a lot of dependencies. So every time i change the version of library, i have to manually change it everywhere from include headers to library paths.
Is there a way to add my own macro like NODE_VER=0.10.0 ?

Using MinGW/GCC built DLL in a Visual Studio 2010 C++/CLI project

I have a communication library built on top of Qt and Google Protocol Buffers. It's currently being built with MinGW/GCC on Windows. My goal is to use the same library in C# on .NET, with the help of a thin wrapper on top using C++/CLI (bridging the unmanaged code with managed code).
I tried using the MinGW produced DLL directly in my C++/CLI project, but I keep getting linker errors (cant remember the error codes right now, but something about missing tokens and functions/signatures).
First question is: Should I be able to use the MinGW-produced DLL with the Visual Studio compiler/linker? Or do I need to compile the library again, using only VS compiler for all projects?
If I should be able to use the MinGW-produced DLL directly, how do I reference it in Visual Studio 2010? In project settings it seems to look for *.lib files, but I can't find any .lib files in the output of MinGW/GCC. It does produce *.a files, but it seems like Visual Studio don't handle this kind of file..
I should also mention that both Qt and protobuf are also compiled with MinGW. But I can of course recompile all the parts in VS 2010 if necessary.. Would have been nice to save the recompile time though, since our buildserver already has a working setup using MinGW.
The easiest way to use it would be by recompiling it with Visual Studio. This is when I am assuming C++ types and classes used in the interface you intend to use.
In case you have a C interface to this library you could dynamically load the library via LoadLibrary and use GetProcAddress to access those functions.
However it depends completly on the way how you intend to use the library.

gcc compiled code on visual studio

Assume I have source code for a lib/tool that works on gcc compiler. Can I use the same code and compile it in visual studio. will that be possible at all? If it is possible, how do I do it?
if you are just using all the standard C/C++ library like stdio.h, stdlib.h, etc. it should work fine. Pure console program should work fine. If you used some GUI related library (especially if you are porting over from unix to window) then it might not work.
To do so, you can simply just create a new project in visual studio and add the existing source code into the project workspace. Compile it, if you encounter any error, just post here or try solve if you know how
It depends on your code, GCC support a variant of C (C99) which Visual Studio doesn't support yet.
If your trying to compile a Unix program on Windows you best bet will be to use Cygwin.
Check this question for pointers on using Cygwin in Visual Studio.

Resources