Click here to Skip to main content
15,881,679 members
Everything / Compilation

Compilation

compilation

Great Reads

by Huisheng Chen
Using reflection to dynamically verify if an assembly is in debug or release compilation
by honey the codewitch
A Pike virtual machine and optimizing compiler for regular expressions using an NFA engine
by Vladimir Ivanovskiy
This article shows how to compile and run F# code during runtime.
by Miguel Diaz Kusztrich
Object creation driven by source code in any language you have designed

Latest Articles

by honey the codewitch
Adventures in Reflection.Emit! Here I present a regular expression engine with a Compile() feature.
by Tiago Cavalcante Trindade
How to use WSL, GUI on WSL and how to compile for Linux on Windows
by Peter Belcak
A short review of the literature on the subject of multi-machine parsing
by honey the codewitch
A Pike virtual machine and optimizing compiler for regular expressions using an NFA engine

All Articles

Sort by Score

Compilation 

4 Feb 2012 by Huisheng Chen
Using reflection to dynamically verify if an assembly is in debug or release compilation
3 Feb 2020 by honey the codewitch
A Pike virtual machine and optimizing compiler for regular expressions using an NFA engine
22 Aug 2011 by Vladimir Ivanovskiy
This article shows how to compile and run F# code during runtime.
12 Mar 2012 by El_Codero
Hi,I'm sure Mono is what you're searching for ;).Take care of the compatibility, WPF is unfortunately not supported currently.http://www.mono-project.com/Compatibility[^]Best Regards
8 Jan 2017 by Miguel Diaz Kusztrich
Object creation driven by source code in any language you have designed
18 Dec 2011 by Sergey Alexandrovich Kryukov
There is not such think as "DOS Command line" in any OS called "Windows". CMD.EXE, in particular, is a regular Win32 or 64-bit application. "DOS" was only the case when Windows was a graphical environment over DOS, long time ago. Where have you been?[EDIT] See also All ways to execute a dos...
28 Jul 2013 by Raja.Krishnasamy
Attached the test data with method for regression testing by declaring ref type in attribute
17 Dec 2011 by DaveAuld
Have you read this article;Working with the C# 2.0 Command Line Compiler[^]There is bound to be a newer version of the article if you are using other versions.
23 Dec 2012 by Mehdi Gholam
Posted from the comment:Check if the "optimize code" is set in your project.
28 Dec 2012 by Sergey Alexandrovich Kryukov
Who told you that that stdio is available, through reimplementing it via .NET BCL, System.IO, System.Console or something like that?I suggest you use System.IO and System.Console directly instead. Give it a try.—SA
13 Feb 2013 by Sergey Alexandrovich Kryukov
How hidden? I just tested with notepad.exe:dumpbin %windir%\notepad.exe /importsPart of output:File Type: EXECUTABLE IMAGE Section contains the following imports: ADVAPI32.dll 10000C000 Import Address Table 10000D1E8 Import Name Table ...
20 Mar 2017 by Jochen Arndt
The error is here:m_message = new char[strlen(value + 1)];That will allocate two characters less than required (random size when the passed string is empty).It must be:m_message = new char[strlen(value) + 1];The error is also present with G++ builds but not detected.
20 Jul 2017 by F-ES Sitecore
Animal a = new Dog(); You're creating two things, you're creating an object (Dog) and a reference variable (a). The object is a Dog, it will always be a Dog and part of being a Dog means also being an Animal. The variable you create is of type Animal and is pointing to the Animal part of...
9 Mar 2018 by #realJSOP
Google is your friend: c# object defaults - Google Search[^]
9 Mar 2018 by Afzaal Ahmad Zeeshan
Apart from what John suggested in Solution 1, please also read about value-types and the reference-types in .NET framework context. In the context, if the developer leaves out the initialization step and only performs declaration, the default value is assigned — which is obvious. I am not an...
17 Dec 2011 by Wendelius
About response file, see: @ (C# Compiler Options)[^] Also, could you use MSBuild[^]
27 Dec 2012 by Alexandre Bencz
Hi, I'm playing with lcc compiler for .net http://research.microsoft.com/en-us/downloads/b994fbbf-f7bb-4a4a-998c-2f6a6d340ec6/[^]https://sites.google.com/site/lccretargetablecompiler/[^]So, but, when I try to build the il generate code, I got that erro:C:\lcc>set...
14 Feb 2013 by fjdiewornncalwe
Right-click on your Project and select "Add Reference". Find System.ComponentModel in the Framework list and add it or the applicable sub assembly. That should be all you need to do.Forget trying to add a reference with the Assembly.LoadFrom stuff. Totally the wrong way to do that.
14 Feb 2013 by Sergey Alexandrovich Kryukov
You are doing it wrong; and this is the fundamental thing. Without it, you cannot develop any .NET products. So, you are not developing. :-)First of all, assemblies are referenced. Using Assembly.LoadFrom is the advanced topic, Reflection. Let's not discuss it here.First, you need to...
9 Mar 2013 by Leo Chapiro
The vshost.exe feature was introduced with VS2005 and (to answer your question) normally you don't need to copy it to another computer.The purpose of it is mostly to make debugging launch quicker - basically there's already a process with the framework running, just ready to load your...
20 Aug 2014 by pi19404
This article describes the method to cross compile C/C++ library for Android OS
16 Aug 2016 by Richard MacCutchan
Portable Executable - Wikipedia, the free encyclopedia[^].Managed Execution Process[^].
9 Mar 2018 by Richard Deeming
Looking at the IL, the only time a static constructor will be generated for you is if you have static field / property initializers. // No static ctor: public static class A { } // Generated static ctor: public static class B { static int answer = 42; } // Generated static ctor: public...
17 Nov 2020 by TheRealSteveJudge
Please have a look here: Process Interoperability - Win32 apps | Microsoft Docs[^] There it is said: On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. ...
17 Apr 2023 by Rick York
Those variables ARE declared in your code. The problem is you are not passing them to the functions that need them. They do not need to be global. Your program does not appear to be multi-threaded so no synchronization is needed. You just need...
2 Aug 2011 by S Houghtelin
One forgotten or mistyped include, definition or declaration can generate many errors. The following links provide information and examples of how the errors can be generated.Have a look at this MSDN page for LNK2019.http://msdn.microsoft.com/en-us/library/799kze2z(v=VS.90).aspx[^]Here...
12 Jan 2012 by nicetuxedo
The code compiles under gcc 4.4 with the following commandgcc -fms-extensions experiment.cUnder gcc 4.6 I get errors#include typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef signed char sint8_t;typedef signed...
12 Jan 2012 by Andreas Gieriet
You need to give names to all union members.In your code, the sub-unions have no name -> no declaration warning.With the extension, the anonymous sub-unions seem to introduce their members directly into the current union. This results in having the members raw, etc. declared twice.Your...
12 Mar 2012 by jsdhgkjdsahklg
Can anybody please tell me the way to compile a C# program on windows for a linux OS?I know it's possible, but I can't find the way on the web, so it'll be much appreciated if someone tell me the way.Thanks you.
3 Sep 2012 by pieterjann
Hello,I'm compiling a program which was originally build in Visual C# 2005. I'am using visual C# 2010. And I keep getting "NullReference Execption was unhandled" errors on the following function:the error occurs on the line with DataBuffer. DataBuffer is just an private string set to null...
30 Sep 2012 by Jerry.Wang
HiEnvironment:My .Net 4.0 web site is deployed on 3 servers with same code. is in machine.congig. is in...
29 Oct 2012 by Sergey Alexandrovich Kryukov
The question makes no sense at all. If you really wanted to "prevent multithreading", you would not use threads at all. The problem not to avoid it, but to use threads properly. It's also not very nice for you to ask something based on your threading concern, but to say nothing about your...
5 Dec 2012 by coffeenet
Hi,I have successfully cross-compiled a program on an x86-64 machine. However, when I try to run on my target machine sh4a, I get the following error:./ioq3ded.sh4a: /lib/libc.so.6: version `GLIBC_2.11' not found (required by ./ioq3ded.sh4a)The details of the two machines are as...
23 Dec 2012 by Sander Rossel
So I'm having a very weird problem... I'm working on a project which does some Reflection stuff. One of the things it does is read the name of methods. I've got code that, in essence, looks like the following.Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As...
14 Feb 2013 by Alan N
OK, thanks for the answer to my comment. I've just tested it and the problem is in the CompilerParameters passed to CompileAssemblyFromSource and you must have missed the reference to System.dlle.g. String[] referenceAssemblies = { "System.dll" }; CompilerParameters cp = new...
9 Mar 2013 by Steve44
Yes, the "app.exe" is sufficient to run on a different machine. (Unless you need some DLLs, then these are required as well.)The "app.pdb" is the debugging database, it is required to debug the app efficiently, but not to run it.The "app.vshost.exe" is only used to run the app within...
7 Jul 2014 by Keenan Payne
In my LESS project I am having issues getting my guarded mixins working with variables that I declared in another file. Here is the code I am working with: _defaults.less (contains all of my variables) //------------------------------------// // @INCLUDE ...
21 Aug 2015 by salece
Hi every body,I have a big problem. here a test code of Dll :main.h #pragma once #define BUILD_DLL #ifdef BUILD_DLL #define DLL_EXPORT __declspec(dllexport) #else #define DLL_EXPORT __declspec(dllimport) #endif #ifdef __cplusplus extern "C" { #endif ...
19 Nov 2015 by tnkarthi
Take for an example, in Command Prompt we give as, >csc /out:"C:\HelloWorld.exe" "C:\HelloWorld.cs"Than CSC Compiler will generate IL File and PE File. Where these files will Save? What are all process from .cs to .exe?
3 Dec 2015 by Albert Holguin
If you really named your library Dll.dll, that's a horrible name! Aside from that, I'd check what Richard suggested above (make sure there's a path to the library or its in a good default location) and also check with a tool like Dependency Walker[^] to make sure there isn't some other...
5 Feb 2016 by Nafees Hassan
It's the fourth day since I moved from Windows to Ubuntu (14.04) and I still am having problems setting up my development environment. I used to be a Delphi programmer, but now want to change to some other language, I've these in mind:C#C++PythonDI installed MonoDevelop, it...
5 Feb 2016 by Thomas Daniels
An easy way to run programs on Linux is from the terminal. Open it, navigate to the directory containing the compiled programs (using the cd command) and run them.C# on Mono:cd yourdirectorymono compiledcsharp.exeCompiled C++:cd...
26 Mar 2016 by DBPatric
I have Windows 7 x64, gtkmm 2.22 x86 and x64, TDM-GCC 4.9.2 x86 and x64, Eclipse Mars.2, and pkg-config installed as an Eclipse plugin. I have successfully compiled both x86 and x64 programs with this setup, but cannot get gtkmm 2.22 working as x86.I have four build options, debug x64, debug...
18 Aug 2016 by Anti-Antidote
For some reason, the replace template from does not want to work for me. See example code below:#include #include #include using namespace std;int main() { string s = "Hello, world!"; replace(s.begin(), s.end(), "l", "i"); cout
18 Aug 2016 by Jochen Arndt
Your call replace(iterator, iterator, const char*, const char *) does not match the std::replace template:template void replace(_FIter, _FIter, const _Tp&, const _Tp&);_Tp is char here because the std::string iterators are pointing to char.So you must...
19 Aug 2016 by Anti-Antidote
string title = "I like to code."char arr[title.size() + 1];strcpy(arr, title.c_str());int i = 0;while(arr[1][i] != 0){ if(arr[1][i] == ' '){ arr[1][i] = '-'; }; i++;};string name(arr);return name;This is the code that I have mashed together. As you can see, I am...
19 Aug 2016 by Patrice T
Try to replace all arr[1][i] with arr[i] to make the compiler happy.To track other bugs:You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.The debugger...
31 Aug 2016 by Richard MacCutchan
See Invoking the Jython Interpreter[^].
20 Mar 2017 by Member 13069821
Hello there. I got my class Error. For some reason VS:Community 2017 gives me an error.HEAP CORRUPTION DETECTED: after Normal block (#149) at 0x00000282A99E0DE0.CRT detected that the application wrote to memory after end of heap bufferI've tried to change my code as much as I could and...
14 Jun 2017 by Richard MacCutchan
Error: could not find or load main class This error just means you are trying to load a class that does not contain a main method. You should go to The Java™ Tutorials[^] and learn about Java and how the classes fit together.
20 Jul 2017 by The_Unknown_Member
namespace CSharp_Practicing { class Program { static void Main(string[] args) { Animal a = new Dog(); // THE QUESTION IS ABOUT THIS VARIABLE !!! } } class Animal { } class Dog : Animal { public void SayBau() { ...
20 Jul 2017 by CPallini
Roughly speaking, yes. You may use it in every context a Animal is allowed (hence its 'compile-time' type), however its actual type, at runtime, is, polymorphically, Dog. Note, your class hierarchy doesn't take advantage of polymorphism.
20 Jul 2017 by Richard MacCutchan
It's always a Dog, as you created it that way in your new statement. In reality the variable is not anything at compile time since it does not exist until the program is run.
28 Jul 2017 by The_Unknown_Member
Im wondering how the MSIL is running without being compiled firstly ? As I know .NET uses a JIT compiler and the JIT compiler is both interpreter and compiler which runs after the program start (in run-time). So how the MSIL is getting executed ? What I have tried: Asking a question here in...
28 Jul 2017 by OriginalGriff
Quote: So how the MSIL is getting executed ? There is a wealth of resources on t'internet which explain this: Code Execution Process[^] provides a nice overview, but Google can find you more details. Quote: Can you also explain me how the Assembly code executes ? For example lets assume we have...
30 Sep 2017 by Richard MacCutchan
It depends which compiler or IDE you plan to use. If you want to develop on Windows then get a copy of Visual Studio from Visual Studio Express | Now Visual Studio Community[^]. Study the documentation and see how the IDE does most of the setup for you. Although you will need to understand the...
24 Oct 2017 by Member 13376650
I am trying to compile and test a simple code with ChatScript program.As the tutorial says here: [^] Quote: Embedding Step #1 First, you will need to modify common.h and compile the system. You need to add all the CS .cpp files to your build list. Find the // #define NOMAIN 1...
24 Oct 2017 by OriginalGriff
You need to go back to where you got the tutorial from: either you are missing important include files, or you are using the wrong compiler, or you just don't have all the source code. We can't tell - we don't even know where you got this from, so we can't even begin to help you! Talk to the...
30 Oct 2017 by CPallini
Assuming the installation is fine, you shuold issue g++ testSpeak.cpp -o speaks -l espeak-ng
7 Jan 2018 by kkdxghlctlcxxtidyuum
Hello, Just a general question: A made-up programming language that is then interpreted/compiled(?) using a high-level programming language such as C++ to give output is what: a compiler or an interpreter E.g. MoveCursor(132, 242 (Spline)) - made up programming language example. This...
9 Mar 2018 by The_Unknown_Member
I know that the C# compiler will put a default no-args constructor for instance types but what happens if the class is static? Is the case the same? What I have tried: Looking at the Programming Guide on C# for static constructors but didn't find anything related to my question.
9 Mar 2018 by The_Unknown_Member
When you create a class with some fields that don't have any value explicitly specified by the developer they are defaulted to their default values (for Int32 it's zero). So my question is how do they get defaulted? Does the C# compiler do something behind the scenes in the process of compiling?...
16 Jul 2018 by OriginalGriff
That'll be because the DLL that it's using isn't the same as ateh source code for that DLL you have available. Check the modification date of the DLL file, against the source code and it's debug version (assuming you are using the debug DLL - I can't see your screen so I can't be accurate).
1 Aug 2018 by CPallini
Just Googling you may find many step-by-step tutorials on this very topic. See, for instance: Writing Your Own Toy Compiler Using Flex, Bison and LLVM (gnuu.org)[^].
17 Aug 2018 by Member 13952559
My Makefile: HEADERS = headers.h macros.h main.h socket.h main.o : main.c main.h cc -c main.c socket.o : socket.c headers.h macros.h cc -c socket.c main.c #include "main.h" main() { printf("%s\n","Connect_Socket Start"); Connect_Socket(IP_ADDRESS, PORT); printf("%s\n","Connect_Socket...
17 Aug 2018 by OriginalGriff
Ata guess - and without your computer to hand that's all it can be - you don't get the output because the app is too busy connecting the socket to update the display. Try adding a user input after the printf and see what happens.
17 Aug 2018 by Jochen Arndt
Executing make will build the target according to the specifed rules. But it will not execute the created application. To do that after a successful build do it like you have done with manually compiling: type the name of the executable at the shell prompt ./mqtt_c8y
18 Nov 2020 by DoingWork
Dear Friends My Main application is 32-bit application. It is limitation due to some third party DLLs that I can't convert it to 64-bit. Now I have created a new 64-bit library project and compilation is successful but on application startup it...
31 May 2021 by Orly Ndonse
%{ #include "syntaxe.tab.h" char nom[]; %} chiffre [0-9] lettre [A-Za-z] entier (-)?{chiffre}{chiffre}* reel {entier}.{chiffre}*((e|E) {entier})? identifiant {lettre}({lettre}|{chiffre})* /*on va passer à la partie regles de traduction*/ %%...
2 Sep 2022 by Mony2020
main.java import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { private static String[] name; ...
2 Sep 2022 by OriginalGriff
That's because your teacher helpfully added markers where you need to provide code: students.add(student);`enter code here` The `enter code here` bit is not executable Java code but an instruction to you ... You should expect to get...
2 Sep 2022 by Richard MacCutchan
In your main method you have the following lines: private static String[] name; public static boolean readFile(String filename) { File file = new File("studentdata.txt"); try { Scanner scan = new...
27 Nov 2022 by reverser69
hi for some debugging puposes i need a debug build of new JDK so i can debug with .pdb files. i searched a lot and the only thing i could find was v1.8 which is very old. i also tried compiling the jdk but i only god errors. is there any link...
27 Nov 2022 by Dave Kreskowiak
Then you're going to have to build your own copy. You're going to have to read ALL OF THIS[^].
19 Jun 2023 by Wassa Bizo Ismaila
I have a WPF project that I need to compile, load as a DLL file, and access its components programmatically. I'm currently using the Roslyn Compiler in my function, but I'm open to alternative solutions if they can help resolve my issue. The...
25 Oct 2023 by Karl Steven Renevera
I just want to make a Windows Form in C++. After opening a template, the codeblock appears along with the designer. Then, I just want to see if the compiler works, so I tried to compile and... it gives me these. Build started... 1>------ Build...
17 May 2021 by OriginalGriff
IF you get an error you don't understand, Google it: LINK : error LNK2001: unresolved external symbol _main - Google Search[^] There are loads of suggestions there, so have a look and see what fits your exact situation. We can't see your code -...
17 May 2021 by KarstenK
Set the linker warning level to verbose to see details. It sounds like you have some misconfiguration in the Configuration Type. Check that you are producing an Application and not some dll. But the MSIL is a beast so you will spend some time...
17 May 2021 by Richard MacCutchan
See Building a Windows Forms Application in C++ environment[^]. Your project should include a source file that includes the main function.
9 Mar 2019 by AlexeyYakovlev
This paper demonstrates a technique of building Sprache parsers using grammar inheritance.
31 Dec 2019 by honey the codewitch
Use the Parsley compositional parser generator to parse a complicated grammar with backtracking.
24 Oct 2022 by Tiago Cavalcante Trindade
How to use WSL, GUI on WSL and how to compile for Linux on Windows
19 Jan 2020 by honey the codewitch
A completely programmable lexer/tokenizer/scanner generator in C# using a Pike Virtual Machine
26 May 2017 by matt warren
Lowering in the C# compiler (and what happens when you misuse it)
12 Jul 2012 by Christopher Diggins
An introduction to creating programming language tools using C# 4.0.
9 Jan 2020 by honey the codewitch
Generate powerful, maintainable parsers in most major .NET languages using a friendly grammar format
14 May 2014 by Gregory Morse
A full-featured Z80/8085 assembler in C++
6 Jan 2024 by honey the codewitch
Adventures in Reflection.Emit! Here I present a regular expression engine with a Compile() feature.
12 Dec 2016 by Sundeep Kamath
Ever wondered why Visual Studio IDE provides 3 options for compilation - x86, x64 and Any CPU? As part of this article, I hope to shed some light on this.
18 Dec 2016 by Sundeep Kamath
How to check platform affinity for a managed .NET process executable (PE)
5 Jan 2016 by p0a1u2l3
How to Build a Simple Dependence Injector from scratch using C#
26 Dec 2015 by Frank-Rene Schaefer
Using Quex to generate lexical analyzers
17 Jan 2020 by honey the codewitch
A Pike VM for running non-backtracking NFA regular expressions in C#
7 Dec 2019 by honey the codewitch
Getting an accurate CodeDOM back from a C# source subset
7 Jan 2018 by Thomas Daniels
Quote: My question is: Is this made up language a source-to-source compiler, or is it an interpreter? Neither. It's a programming language. A compiler is a program that transforms code from one language to another (for example, C to Assembler). An interpreter is a program that performs...
10 Jan 2021 by Peter Belcak
A short review of the literature on the subject of multi-machine parsing
17 Nov 2020 by Richard Deeming
You can't load a 64-bit library in a 32-bit process, or a 32-bit library in a 64-bit process.
6 Jan 2020 by honey the codewitch
Using Parsley to parse a C# subset into the CodeDOM
29 Oct 2012 by pieterjann
I have a main form, and depending on the users choice, I show user controls with the information the user needs.This way I get about 6 user control windows, which should be managed properly.What I want is to create a function which is called SelectActiveWindow(string windowname) I put...