About C, C# and Unity compiling time [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
If I write a library for chess ai in C or C++ and I used in Unity with C# then is this library compiling fast like in C or slow like in C#.
For example; There is a code compiling in C 7secs and C# 1min. So, what will I see in Unity?
(F. Sorry for my bad language.)

Firstly, I don't know about those times, but let's assume you're right. You don't generally write C or C++ code that Unity will compile. You would compile your code to a DLL and include that DLL in your Unity project. As such, there would be no compile times for that specific DLL. It's not a bad practice if you've got a library that you don't need to compile often.
Another method to reduce compile times is to use Assembly definitions. This does a very similar thing to compiling your library in to DLLs, but is done "within the Editor". The basic premise is that once a project is compiled, it doesn't need to be compiled again unless there were changes made to it.
The Unity Docs here go into full detail.

Related

Is it possible to use a c# dll in Qt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am writing a program that utilises a c# sdk. The functionality of this program will be used in a larger program written in c++ using QtCreator. I would like to create a c# dll to interact with the sdk and then consume this in the c++ program. Has anyone done this before and can point me in the right direction.
Many thanks.
You can, I do this regularly at work. You can consume C# from C++ using COM and Interop. Worth noting now that this is all windows only.
If you've not used COM from C++ before you are in for a nasty surprise. It's fairly unpleasant.
This is a very big topic, so I can't really cover it in a post, but if you want to learn more, I'd look here for starting on the C++ side:
COM(C++) programming tutorials?
I'd recommend using ATL to make your COM life a lot easier.
EDIT: Actually I didn't know this, but Qt has COM support, so you'd be much better off using that - Have a look at https://doc.qt.io/qt-5.10/activeqt-index.html
Google around for the C# side, but it's mostly about using the ComVisible and Guid attributes on your classes to make them COM ready and then registering them using regasm.exe (Part of the .NET Framework).

Implementing Lua for C# [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've built a robust system that has many core functions that might actually get mess to use if I keep on expanding the code - therefore I decided to implement a scripting language and ability for program to read scripts from external files.
My first idea was to use C# by default, but then I've remembered how easy and readable Lua was, so I went with that - sadly, I can't find a simple yet effective library that would allow me to incorporate lua into my software.
tl;dr — is there a simple library one could use to implement lua and thus make usage of software built-in functions way easier? What are your thoughts and opinions on that?
First, there's MoonSharp.
I did experiments with it a while ago. Ultimately, I found it unsuitable for my needs, but it was straightforward to make use of.
Edit: dug up my GitHub repo where I tried this out.

Need to compare C# source code with dlls [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We were using a product from a vendor provided to us in form of dll's. Now we are taking over that vendor product's source code. Our core application is dependent on those vendor provided dll's. We want to make sure that the source code that is provided to us is the same as of the dll's we are using. Otherwise our code can break and that could cost us big time. Can anyone please suggest a tool or a way we can compare the source code with dll's.
One way is that we can compile and publish the dll's and then compare the dll's, but that is going to be a huge task as there are multiple packages included in the base product including some aspx and html pages. We are looking for a quick and clean way to perform the task.
Any help 'd be much appreciated. Thanks
For me the only good way is to ask the vendor to provide the compilation environnement as well as the source code (using a Virtual Machine for example).
Recompilling the source, then comparing the DLLs is the only good way.

Are there any C# to C converter tools? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I know C# is different from .NET Framework, C# is a programming language that standard by ECMA (ECMA-334) and ISO (ISO/IEC 23270).
I don't want a converter that converts ANY C# source code (including .NET Framework) to C, but I want a tool that converts an ECMA standard C# source code to ANSI C source code.
Something like java2c but for ECMA C#.
There is not exactly such thing, but the Vala programming language is able to take a source code very similar to C#, and generate C codem or compile it directly.
http://live.gnome.org/Vala
Of course, the only problem are the libraries: C# has a lot of API's that you'll have to provide, or modify your source code to adapt to the Vala standard library.
If you wanted to translate this code to C because you need it compiled, there are other possibilities.
For example, ngen in the microsoft world:
http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.80).aspx
In the mono project, you can create a single exe file with the interpreter and the libraries. Look for mkbundle:
http://www.mono-project.com/Mono:Runtime
Mono is able to compile "ahead of time", i.e., generate the native code even before the program is going to be executed, so it will run faster.
http://www.mono-project.com/Mono:Runtime#Ahead-of-time_compilation
Depends on what you mean. If you mean "Is it possible to convert C# to readable and maintainable C-code?", then sorry, the answer is no — C# features don't directly map to C.

Do you have any tips for C# Minification? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I need to minify some C# code in a handful of Silverlight .cs and .xmal files. What are your tips for maintaining one code base and running a "tool" to generate minified code for a project?
Are there any tools (like Resharper) that will do this? If not fully, partially or assist in some way...
EDIT: I realize that there is no need for C# minification. This is an exercise that I'm doing that does not make sense on the face of it. (This is not homework.)
How about a source-code obfuscator? They generally abbreviate names, etc - and certainly remove white space.
For example, here, with demo here (although you'd probably want to disable the string encoding if possible). Note that this isn't a direct recommendation: this is just the first hit I got for C# code obfuscator.
Is that necessary? It was my understanding that the compiled .Net assembly would be sent across the wire, not the C# (or whatever language) source code.
Here are two "Lessons Learned" posts from other 10k entrants:
Thoughts on the MIX 10K challenge
MIX09 10K Smart Coding Challenge

Categories

Resources