Click here to Skip to main content
15,890,282 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 Title

Compilation 

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...
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...
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.
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. ...
18 Nov 2020 by RickZeeland
Here is a possible solution: How do I use 32-bit dll in 64-bit app?[^] But it does not look very robust to me, another option might be to split your application in a 32 part (with all the legacy dll's) and a 64 bit part and let them communicate...
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...
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.
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...
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 ...
14 May 2014 by Gregory Morse
A full-featured Z80/8085 assembler in C++
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...
3 Sep 2012 by Ganesh Nikam
hiii,add Condition if(!string.isNullOrEmpty(DataBuffer)){ if(DataBuffer.Contains(ok)) { okFound = true; }}
4 Sep 2012 by Matt T Heffron
All 3 of the references to DataBuffer you have shown will cause the NullReferenceException to be thrown if DataBuffer is null.Why not just initialize it to string.Empty instead of null ?
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.
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
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...
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.
9 Mar 2013 by CyrusT
After I compile a C# application in Visual Studio,in the bin\debug\ directory of project,5 files are built.And there are 2 .exe files among them.with such names: "app.exe" and "app.vshost.exe".Can I copy and paste ONLY the exe file "app.exe" to another computer for running my application...
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...
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...
20 Mar 2013 by Sergey Alexandrovich Kryukov
All you need to using your code on any machine (where required version of .NET Framework is installed), all you need should be in your output directory, which you control by your project properties (see the "Build" tab). But if the debugging information is provided, some files are redundant for...
6 Jan 2024 by honey the codewitch
Adventures in Reflection.Emit! Here I present a regular expression engine with a Compile() feature.
20 Aug 2014 by pi19404
This article describes the method to cross compile C/C++ library for Android OS
30 Jun 2015 by Member 11804735
Hi.I recently wrote a program for image progressing with OpenCV libraries. Now I must add some function to it for connecting to MySQL and read a flag. Know I have some question: 1. what must I use? gcc or g++ for compile the program? (in CentOS)2. How I can compile it? whit which flags and...
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)
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 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...
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[^].
22 Aug 2011 by Vladimir Ivanovskiy
This article shows how to compile and run F# code during runtime.
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...
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...
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...
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...
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*/ %%...
13 Feb 2013 by mcrawley
Poking around in a number of native Windows 7 assemblies using PEStudio 3.69, I was surprised to find no imported methods among several native assemblies, like Explorer.exe, notepad.exe, and others. Each referenced a lot of libraries, but no specific methods. I find that vary unusual. Under...
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 ...
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 ...
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...
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...
31 Aug 2016 by Papasani Mohansrinivas
i compiled my python program in > > i typed below code to compile a python file using jython from command promptWhat I have tried:java -jar jython.jar jython union.py>below is error shown from command propmtTraceback (innermost last):`` (no code object) at line 0 ...
31 Aug 2016 by Richard MacCutchan
See Invoking the Jython Interpreter[^].
30 Sep 2017 by Member 13437177
Hi I am a newbie in programming How do I compile and make single exe file from a c+ or other program from git-hub? Also I want to add a simple line to check if the user is logged in in my database and if not, he should be logged in to use the program before it starts Awaiting your guidance...
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...
17 Apr 2023 by DosNecro
#include #include #include #include // for sleep() function #include enum direction { UP, DOWN, LEFT, RIGHT }; struct ant { int row; int col; enum direction dir; }; void...
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...
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...
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...
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...
17 Dec 2011 by Southmountain
I know how to compile one program file in C#, i.e., demo.cs in command line like this: csc.exe demo.sc in DOS command line.But, if I have many files such as file1.cs, file2.cs, ..., file10.cs and file1.cs contains main method, what is the best way to compile this project which include 10...
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.
17 Dec 2011 by Wendelius
About response file, see: @ (C# Compiler Options)[^] Also, could you use MSBuild[^]
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...
2 Nov 2022 by hermione88
Hello everyone, I need to create a web page that can take the input from the user and compile it according to the selected programming language. Please, could you help me ? What I have tried: I saw many sites providing services to compiling...
2 Nov 2022 by montasser20
To do that you have to own VPS to run shell commands the following example shows you how to run a python file in shell. That means you will receive the input then create a virtual file with python name and then execute it by using the following...
19 Nov 2022 by Moneer Fahmy
I guess, they are using Application Programming Interfaces(APIs). So, they are sending the user coding into URL of API to compile it. If you have any question let me know Online Python Compiler
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...
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...
12 Jul 2012 by Christopher Diggins
An introduction to creating programming language tools using C# 4.0.
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?...
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...
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...
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
3 Feb 2020 by honey the codewitch
A Pike virtual machine and optimizing compiler for regular expressions using an NFA engine
26 Dec 2015 by Frank-Rene Schaefer
Using Quex to generate lexical analyzers
19 Jan 2020 by honey the codewitch
A completely programmable lexer/tokenizer/scanner generator in C# using a Pike Virtual Machine
24 Oct 2022 by Tiago Cavalcante Trindade
How to use WSL, GUI on WSL and how to compile for Linux on Windows
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.
16 Oct 2023 by Member 16116277
You need to load the form in main. My form is named: MainForm.h My main c++ program is named: mainForm.cpp In mainForm.cpp add the following code: ------------------------------------------ #include "mainForm.h" using namespace skemaProgram; ...
14 Jun 2017 by four systems
java.lang.ClassNotFoundExcepti...
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.
26 May 2017 by matt warren
Lowering in the C# compiler (and what happens when you misuse it)
10 Jan 2021 by Peter Belcak
A short review of the literature on the subject of multi-machine parsing
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...
1 Aug 2011 by bearbear91
Hi,I need help with my face recognition program.I got these errors when i build my program:error LNK2019: unresolved external symbol "public: virtual void __thiscall cv::HOGDescriptor::setSVMDetector(class std::vector > const &)"...
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...
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
31 Dec 2019 by honey the codewitch
Use the Parsley compositional parser generator to parse a complicated grammar with backtracking.
6 Jan 2020 by honey the codewitch
Using Parsley to parse a C# subset into the CodeDOM
9 Jan 2020 by honey the codewitch
Generate powerful, maintainable parsers in most major .NET languages using a friendly grammar format
17 Jan 2020 by honey the codewitch
A Pike VM for running non-backtracking NFA regular expressions in C#