cannot release C++ game project in visual studio - visual-studio

I created a project and did some changes to that project in order to get access to SFML. (I'm following a tutorial, that's what they did). After that I exported it as a template.
Then I created a new project from this template and code the game. I used SFML library for that. It all works fine in debug mode. But when I select the release option, all the classes I have used from SFML are shown as undefined. Game works fine on debug mode.
this is the error

Related

Xamarin Android, java class ListenableFuture is defined multiple times, with new Andriod App

I created a brand spanking new Xamarin Android App in Visual Studio 2022.
I then referenced the v1.0.17.2 of the Xamarin.Stripe.Terminal.Android library as I need to perform some transactions on a card reader.
I compiled the solution without touching a line of code and I got the following issue
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Users\XYZ.nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class, obj\Debug\120\lp\54\jl\guava-28.1-android.jar:com/google/common/util/concurrent/ListenableFuture.class
You can see two jar references in the error message
1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar
obj\Debug\120\lp\54\jl\guava-28.1-android.jar
If I take the full java command line built by Visual Studio, and I then remove the reference the jar
1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar
then java compiles correctly from the command line, with a slew of warnings.
I'm just wondering if there is some way to exclude this JAR from the compile process in Visual Studio, so that the build can continue on correctly.
Any guidance would be much appreciated.

Mwarray.dll for Unity - How can I use it?

I have a problem with the MWArray.dll which is the original dll library from mathworks compiled from Matlab. This dll works under visual studio but not under unity. The goal was to compile under matlab a simple function mycos which calculates a cosinus and uses it under unity with the second dll MWArray mathworks library.
I made a test under Visual Studio and it works well. I have no problem to read the dll and make a call to the mycos.dll class. I made a typical c# project with two references on MWArray and mycos.
But when I try under unity, by putting the two dll under a plugins folder and configure unity 2018 on .NET 4.0 because the dll are compiled with the .NET framework 4.0.
Unity can read the dll but when running I get an error:
NotImplementedException: The requested feature is not implemented.
System.Security.Principal.WindowsIdentity.GetCurrent (Boolean ifImpersonating)
(at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs:166)
If I want to use matlab for a research project which was coded in matlab with advanced high level math functions which going to be difficult to recode under unity with c#. So the easy way is to use compiled package from matlab compiler. So is there someone who did this already?
The solution consists in NOT using MWArray.dll in Unity project because of incompatibility with Mono. Create a Visual Studio project (when creating new select the type "console applicatiion"), it MUST be separated from unity project directory, and use it as an application server; in fact in that app you can use MWArray.dll, remember that you have to configure your project configuration to x64!!! In the Unity project create a client app to communicate with the other server project.

I can't make a C++ project, Visual Studio 2015

Earlier (even yesterday) I could make C++ projects, but now I have a strange problem. When I want to select empty project, the window with creating project settings disappears and shows again and I don't have any solution with any project. I have a blank area. The only thing I changed in this time is installing tools for Python and creating enviroment for interpreter. I can make Python or C# projects but can't make C++ projects. Maybe someone had the same problem?

Integrating C/C++ code in Xamarin for iOS

Under Visual Studio 2015, I have integrated Android C++ code into Xamarin and it works as expected. Now, I am trying to do the same for iOS and am running into some basic issues.
I am assuming the integration mechanism is the same for iOS as that of Android in the sense that a shared library (probably .so) is created that one can load using DllImport in C# code.
When I try to add a new C++ project for iOS to my solution, the only option that seems to make sense is Visual C++-->Cross Platform-->iOS-->Shared Library. I added this project type as MyTestShared. This actually ends up creating three projects - MyTestShared.Shared, MyTestShared.iOS, and MyTestShared.Android. Project MyTestShared.iOS already has an external method defined as char* iOSInfo(). However, when I try to add project MyTestShared.iOS as a reference to my MyMainApp.iOS project, I see an error "A reference to MyTestShared.iOS could not be added. An assembly must have a dll or exe extension."
Questions:
For Android C++, it generates exactly one project. Why does it create three projects for iOS C++?
How do I add a reference to MyTestShared.iOS? What is it that I am missing?
I see there is an option to create a static C++ library for iOS. Can I reference it somehow in my C# code?
Regards.

Unable to get Roslyn end user preview to work, still uses old compiler

I've tried installing the Roslyn end user preview to play around with some of the new C# 6.0 features, but I can't get it to work. I have Visual Studio Premium 2013 Update 3 installed. I've downloaded the Roslyn end user preview, and it installed without any problems. After restarting Visual Studio, I tried doing what has been suggested: create a new project to make it switch to the new compiler, then discard that project and open an existing project, or create another new project.
I've now tried to make a plain console project using the .NET 4.5 framework. However, I can't get any of the new C# 6.0 features to work. Neither auto-property initializers, declaration expressions, exception filters nor explicit constructors will compile for me. I've tried compiling identical code on a different computer without the Roslyn preview installed, and it gives me the same compilation errors, so it seems like it's still using the old compiler.
How can I make VS switch to using the Roslyn compiler instead?

Resources