Click here to Skip to main content
15,898,881 members
Everything / Compiler

Compiler

compiler

Great Reads

by Chris Boss
More about BASIC and what can be accomplished with the language
by honey the codewitch
An LL(1) pull parser and generator that thinks it's an LL(k) parser - with a rich, simple and beautiful EBNF syntax
by Dennis C. Dietrich
Clarifying how the .NET GC identifies objects to collect once and for all... hopefully...
by honey the codewitch
If you use the CodeDOM, here's an indispensable package to make it awesome.

Latest Articles

by Tamar Christina
The article discusses various techniques for improving program performance by optimizing code for compilers, focusing on the ARM platform.
by Alex Rakov, Alexandre Bencz
ELENA is a general-purpose, object-oriented, polymorphic language with late binding
by AmrDeveloper
Introduce GQL (A Git Query Language) to perform SQL like queries on .git files
by Coral Kashri
How compiler helps code run faster and generates warnings in single cross-compiler way

All Articles

Sort by Title

Compiler 

20 Jun 2014 by Gabriel Denys
so I am making my own compiler in C# for a custom Language called algebra.I am following this tutorial http://msdn.microsoft.com/en-us/magazine/cc136756.aspxHere is the source code of the compiler.I think there is something wrong with the compiler code.The code is quite big so I attach...
7 May 2010 by into_the_wild
I installed a Cygwin system on my windows XP platform, following is what I get when use './configure':$ sh ./configureloading cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets...
15 Mar 2016 by Member 10305620
I am trying to compile Libcurl for my project but I am getting below error.g++ -g -o Main.exe Main.o L"C:\Test\src\WebSocket\lib" -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 -DCURL_STATICLIB -llibcurl /mingw32/bin/ld.exe: cannot find -llibcurlWhen I built libcurl usinf mingw32 I got...
15 Mar 2016 by Richard MacCutchan
If you look closely at the Link Options - Using the GNU Compiler Collection (GCC)[^], you would see that the option should be -lcurl.
25 Oct 2021 by Pete O'Hanlon
Getting started with TypeScript
28 Oct 2021 by Pete O'Hanlon
More in-depth look at classes, how to add our own constructors and change whether or not code outside our class can see our fields
3 Jul 2014 by Vishnu Vardhan
Hello developers,I have a legacy 16 bit application written in C which outputs the system time in UTC format (Unix epoch time).The following is the code snippet:time_t t ;printf("%ld\n", time(&t)) ;There is a difference between the time displayed in seconds on 16 bit and 32...
4 Jul 2014 by Subrat 4708266
Representation of data types varies between 16 bit and 32-bit compiler. Also time() function can't give you the exact/accurate time.something would be different because of factors like CPU load,ALU operations, no of Applications running, how any processes running, time slice for each...
16 Sep 2016 by Anti-Antidote
I have a program that gathers user input and outputs it to a file in a specific format. I can't seem to figure out where it outputs to. I'm using Code::Blocks with g++.What I have tried:I have looked all through the files, but cannot find the output file.
16 Sep 2016 by Afzaal Ahmad Zeeshan
When you open a stream to a file, you pass the location of the file (including the name) to that object. Typically, a name of the file is passed only (like, _ofstream.open("file.txt")) which creates the file in the same directory, where the program is residing. In most cases, you would require...
15 Jan 2016 by SrgjanX
first: this is not problem with code, so ignore if you think so, this is just informative.Im 3 years programmer, in which 2 years c#, maybe its a shame to ask question about compiler after 3 years but still i just must know this:1: Im using Visual studio 2015, where can i see my the...
15 Jan 2016 by OriginalGriff
1) Well...technically you can't "see" it - it's just a collections of bytes on the disk.But...it's called "CSC.EXE" and you'll find it in various folders under the C:\WINDOWS\Microsoft.NET\Framework directory - each version in a separate folder.2, 3, 4) Why? There aren't many other C#...
25 Feb 2013 by CodingLover
Hi all,When I run sudo apt-get install g++ terminal display that so many packages I has are the newest version on Ubuntu 12.10. But even after I cannot compile any c++ files. Any comment on this highly appreciate.Note: This Ubuntu 12.10 installation running inside a vertual box which is...
23 Feb 2013 by H.Brydon
I would suggest making sure that all the underlying libraries and packages are up to date. Try it this way:sudo apt-get updatesudo apt-get upgradesudo apt-get install g++If you haven't done the update/upgrade for a while, your system might be too uncooperative to accept the...
9 Aug 2011 by VigneshPT
I want to know how to write a visual C# application which compiles and checks output of a simple source program given by user.For example the user is supplied with the sample input, and sample output for a given scenario, and he is required to write the code for it (in C++) and the...
9 Aug 2011 by Abhinav S
Use the CSharpCodeProvider class[^] to compile your code programtically.
9 Aug 2011 by YvesDaoust
If I understand you, the request is to check correct output for a given input. I wonder there is a real need to integrate the compiler for this purpose.You'd better specify the application in such a way that it reads input from a text file and writes output to another one.After...
9 Aug 2011 by Sergey Alexandrovich Kryukov
As I understand it, the output means output the text to console (if it's is too file, it's trivial, is somewhere else, it would be uncertain); you only need to run some application writing to console under control of your C# application and compare output with some preset data.Is it for...
14 May 2014 by Gregory Morse
A full-featured Z80/8085 assembler in C++
28 Jul 2023 by AmrDeveloper
Introduce GQL (A Git Query Language) to perform SQL like queries on .git files
2 Feb 2011 by George Tryfonas
Assembler and Simulator for Don Knuth's MIX Computer from The Art of Computer Programming.
30 Nov 2013 by ianmartinez97
I am trying to create a program that will generate an executable based on user specified parameters that I add in as resources, but whenever I try to compile the program, all attempts to access the resources fail.In the program that will generate the EXE file, I have this code to compile the...
26 Nov 2013 by Dave Kreskowiak
GetExecutingAssembly returns the currently executing assembly, i.e.: your application builder app, NOT the app you just created an .EXE for from your code.There is no native class in .NET to "edit" the resources of a seperate .EXE or .DLL file. You'll have to use a third party library, or...
11 Nov 2013 by greenoldman
Lexer+parser suite for .Net world
11 Oct 2013 by ASP.NET Community
It's now possible to create class definitions on the fly.  This is the concept of anonymous types, where the type is based on the signature of the
20 Jul 2012 by Rubinder
If you know any other good IDE for C# else then VS plz tell me ...Thnks
20 Jul 2012 by Christian Graus
There are some, but why on earth would you want them ? None are as good as VS.
20 Jul 2012 by Mehdi Gholam
There is sharpdevelop, and monodevelop.http://www.icsharpcode.net/OpenSource/SD/[^]http://monodevelop.com/[^]
18 Jul 2011 by csde9
Hello everyone, I'm currently developing a JavaCC based language IDE for Eclipse and I wanted to know if there are any stable projects that have already used JavaCC to generate their AST representations along with Lexer-Parser files. Thanks.
18 Jul 2011 by Espen Harlinn
If I remember correctly Derby[^] uses JavaCC.Best regardsEspen Harlinn
14 Aug 2019 by Advik Raj
so, I have this asm code with me and i wish to use it inline with c++, (a combo of asm and cpp) i have seen many links for this but none answer how to do this, the asm code is below .text .def ___main; .scl 2; .type 32; .endef .section .rdata,"dr" LC0:
13 Aug 2019 by OriginalGriff
Quote: pls write down the code for me. It doesn't quite work like that. We do not do your work for you. If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there. But be aware: you get what you pay for. Pay peanuts, get monkeys. The idea of...
13 Aug 2019 by Richard MacCutchan
This is the third time you have asked this and we have already given you some pointers. Firstly assembly code cannot be directly converted to C++ code, there is no correlation between the two. And secondly if you want to learn C++ properly then get a book or search online for tutorials. And if...
14 Aug 2019 by Rick York
We can't always get what we want. Here are three links to articles that show you how to write inline assembly. The first link is to an article at this site. https://www.codeproject.com/articles/15971/using-inline-assembly-in-c-c ...
26 Nov 2011 by Jammer
Hi All,I've been looking into AOP lately for a project and was wondering what the general consensus was in .NET land on this issue?There are a few different approaches to this one can take, seems that the "pure" idea of AOP is performing compiler weaving with tools such as PoitSharp. ...
22 Nov 2015 by zhanzibar
can somebody suggest me the best IDE and compiler for assembly? because i've tried to search it but i can't find the best result
22 Nov 2015 by OriginalGriff
Assembly language doesn't use a compiler - only high level languages need that. Assembly language is processed to machine code via an assembler, which is a different type of program altogether.And this isn't a question we can answer: each assembler is specific to a processor type - or even...
15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
29 May 2013 by eduacsp
Hi all,Im a java developer and i want study C++. Which is the best IDE for C++ ? maybe Eclipse ?
29 May 2013 by OriginalGriff
Probably Visual Studio - it is free (in the express editions) and it has a very similar look and feel throughout, regardless of the language you are using. If you have been developing in Eclipse for your Java, then you will probably hate going back to it...
29 May 2013 by Matthew Faithfull
Try a few and see what you get along with. Visual Studio is good, as is Netbeans and Eclipse you already know. CodeBlocks is pretty good these days and some people like Embarcadero's Rad Studio. Qt comes with it's own IDE which is usable. Ultimate++ seems to work and I've heard a few good things...
29 May 2013 by pasztorpisti
For C++ Visual Studio equipped with a few plugins is unbeatable (plugins VAssistX, and I like the extended scrollbar of Productivity Powertools). I share the opinion of OriginalGriff about moving from Java+Eclipse to C++ and Visual Studio. C++ is hard to parse (C macros and other ugly stuff) and...
1 Dec 2010 by fresh_girl
I have these rules :Q_ID : Q_ID '.' Id |Id;classdecl : modifier CLASS Id IS END |modifier CLASS Id INHERITS Q_ID IS END |modifier CLASS Id IMPLEMENTS Q_ID_LIST IS END |modifier CLASS Id INHERITS Q_ID IMPLEMENTS Q_ID IS END
1 Dec 2010 by Manfred Rudolf Bihy
Hi Fresh,eventhough it's been some time since fooling around with Lex & Yacc (aka bison) I'll give this a shot. For reference reasons I've added line numbers to your grammar: 1 Q_ID : Q_ID '.' Id |Id; 2 classdecl : modifier CLASS Id IS END 3 |modifier CLASS Id INHERITS Q_ID IS...
31 May 2012 by hannac
hi,how has book for build c++ compiler?please help me and i want lexical syntax & generation codt to build compiler.it is important,because i search about it in the net but i don't find the code so please help me
31 May 2012 by CPallini
There are several good books on writing compilers (see, for instance the classic 'teoric' Dragon Book[^] or 'more pragmatic' Fraser and Hanson's one[^]).It is worth noting that building a C++ compiler is a daunting task (C++ is a damned complex language).
31 May 2012 by Aescleal
There's only been one person in the history of mankind to have built a C++ compiler single handed, Walter Bright [1]. So I wouldn't even try yourself. He wrote a C compiler, saw a copy of the C++ Annotated Reference Manual, said "how hard can this be?". A couple of years later he'd found out how...
5 Aug 2013 by gssajith87
Hi Friends,I am not sure why i am getting the below linker errors. Can some one help me in understanding what the error below says., I have no clues on what this errors tell me to do. Kindly help me to understand the error so that i can solve it myself.>RegularExpressionFilter.obj :...
5 Aug 2013 by User 59241
Quote:error LNK2001: unresolved external symbolTells you immediately that the linker cannot find this symbol in any library. You most likely have not included the required boost library in your project.See this link for "Using Boost libraries"Building Boost libraries for Visual...
14 Nov 2011 by Mladen Janković
This article shows how to produce executable file from brainf*ck source code using CodeDOM
30 May 2010 by Member 7031749
I have given source path where I included xyz.c .Then I tried to buildfrom command prompt with the command build -ceZ. I am getting this error.NMAKE : fatal error U1073: don't know how to make xyz.obj
18 Apr 2012 by Jackie00100
Hi all im working on a C# compiler and i've reached this far that i have to make arrays. now i've tried opcodes.newarr and that works somewhat fine but my problem is that i would like to emit a array at type [,] and not[][] and have there by moved on to opcodes.newobj but somehow i cant make it...
18 Apr 2012 by Clifford Nelson
If I understand what you want to do, I do not beleive it is possible. What you want to do is similar to jagged arrays: http://msdn.microsoft.com/en-us/library/2s05feca.aspx[^]
18 Apr 2012 by Jackie00100
I made a few addition to my Arrays and added this code in the codegenerator and it works just fine now :) Arrays arr = (Arrays)value; deliveredType = arr.array.GetType(); Type myType = arr.array.GetType(); Type[] types = new...
16 Mar 2012 by Jackie00100
Hi everyonei wanna make a programming languages in C# but i'm kinda lost where i should start looking. I've been looking a bit at these video here: http://www.youtube.com/watch?v=iRzPeFmsFd4[^] and got an base idea how to make it but it seems very low level and i wanna have it some what...
16 Mar 2012 by CPallini
Have you had a look at Grammatica[^]?
18 Apr 2012 by Jackie00100
I've found for some ago something called "GNF-Compiler" that i found on MSDN and that works fine Link: http://msdn.microsoft.com/en-us/magazine/cc136756.aspx[^]
11 Jun 2013 by p4p4p4
Hello,I have a general question regarding how a C/C++ compiler will handle generating machine code with respect to a struct.Lets compare the generated code for:int Var1;int Var2;bool Var3;cout
13 Jul 2014 by Sergey Alexandrovich Kryukov
The two pieces of the code are fundamentally different. And this is quite clear.Your 3 variables statically occupy 3 slots in memory after the code is loaded. As to the struct, it occupies none, but instantiation of MyStruct does get memory (it's not the fact that exactly the same, as it...
12 Jun 2013 by parths
Try checking the assembly output for yourself. Going through the assembly generated by a compiler can be quite interesting.For example, in gcc you can use the -S command line optionWith Visual studio, go to project properties->Configuration Properties->C/C++->Output Files and set the...
12 Jun 2013 by CPallini
Quote:Will the compiler generate different machine code for those two blocks of code? I've been reading that it does notQuite the opposite: it probably does and you may check yourself having a look at the machine code (or assembly) produced by the compiler itself.Quote:Also, typedef is...
13 Jul 2014 by KarstenK
In release build the compiler may unwrap the struct to variables.Which is depending on the individual compiler and its settings like => "loop enrollment"The LLVM from Apple is constructing extra loops with special register operations.A good optimizer would check whether the Var1 is...
25 Mar 2010 by Opul3nce
Hi, recently tried to compile a code on optical flow. Got this error!Build Log Build started: Project: proesmans, Configuration: Debug|Win32 Command Lines Creating temporary file "c:\Documents and Settings\Administrator\My Documents\Visual Studio...
25 Mar 2010 by Richard MacCutchan
c:\documents and settings\administrator\desktop\project software\of-eval-1.0\of-eval\of_implementations\proesmans\proesmans.h(7) : fatal error C1083: Cannot open include file: 'values.h': No such file or directorymain.csimply means that you have added an #include "values.h" in your...
22 Apr 2023 by Coral Kashri
How compiler helps code run faster and generates warnings in single cross-compiler way
17 Aug 2013 by Yabiten
Hello everybody, I really need some help here..well I'm working on a project with VB.Net (or C#, I didn't decide yet), it's a programming contests desktop judge like "pc²" if you know it.I'm wondering if I can find C, C++ and Java compilers code source programmed using Vb.Net (or C# if...
17 Aug 2013 by Ron Beyer
While it is possible to do, I don't believe anybody has written a C/C++/Java compiler in VB.NET or C#. Writing a compiler is quite an undertaking, if you are wanting to go down that road then I would suggest learning ANTLR[^]. However due to the question itself, I'm pretty sure that this may...
13 Jan 2022 by Pepe Sea
So we all know how Python is a generally simple, and easy-to-understand language both in syntax and logic. Now I'm thinking of a project in which I would need a slightly modified version of Python with little logic, and syntax tweaks. So I...
13 Jan 2022 by Afzaal Ahmad Zeeshan
This kind of question can easily be answered with a quick Google search. But, I would like to ask you why you want to do it? Python is an open-source programming language and is actively contributed to. If you wish to contribute, visit Python...
26 Apr 2010 by David21u2
Hi, I'm having some issues with the memory allocation... I work with BDS2006 but i'm considering to migrate to 64 bits OS...which version can I use... Builder 2010 maybe ?tks in advance
26 Apr 2010 by #realJSOP
I don't see why not. At the very most, you'd have to set compatibility on the executables associated with the compiler, but I doubt you'd even have to do that.I didn't even know Borland was still making compilers...
28 Apr 2010 by Gordon Brandly
The answer is the same as for your duplicate question: no version of C++Builder produces 64-bit code right now. Embarcadero does plan to add 64-bit capability to a future version, since it's been requested many times.
25 Jun 2012 by mathidioticz
I encountered this error:I Cannot implicitly convert type "System.Web.UI.WebControls.LoginView" to "Login"Line 26: Login Login1 = (System.Web.UI.WebControls.LoginView)LoginView1.FindControl("Login1");Line 27: TextBox UserName =...
25 Jun 2012 by Sandeep Mewara
Error clearly lies here:Login Login1 = (System.Web.UI.WebControls.LoginView)LoginView1.FindControl("Login1");You are trying to cast a "Login" control into "LoginView". You can clearly see that you are trying to find a control inside 'LoginView'(child control) but then trying to cast it to...
17 Feb 2010 by Keith Barrow
I came across this tool, briefly mentioned on one of the Hansleminutes podcasts:SnippetCompiler[^]The application allows you to write, compile and run scratch code without the overhead of creating a whole VS project. It has been useful for me on the code project, when I want to make...
11 Dec 2019 by honey the codewitch
If you use the CodeDOM, here's an indispensable package to make it awesome.
5 Nov 2010 by chiselca
With VB6 I often used a batch file to perform a command line build. This lets me set all of the projects' Conditional Compilation Arguments to their default value for a RELEASE build, overriding those settings in the project file. The command line would look something like this-Vb6.exe...
5 Nov 2010 by Abhinav S
Try using msbuild /property:Configuration=Release MyFile.vbproj in the Visual Studio command prompt.You could also consider third party tools like Nant.
5 Nov 2010 by chiselca
Abhinav S,Thanks for the quick reply.I took a look at msbuild and there is a property called DefineConstants that, according to many internet articles, can be used to set the compiler switch values. But after trying it, and reading a couple more posts after I could not get it to work, I...
16 Dec 2016 by Member 12908639
i'm trying to make a windows form program to teach the c# language...so i need to give an exercise ( like add 2 integers and show their sum )the user must put their code in a text box and the compiler will process itbut now it comes that part ,, that the exercise might have more...
16 Dec 2016 by Patrice T
I hope you will get ideas in those sites.This one is to teach you programming:Learn to Program[^]and this one is to teach you languages:W3Schools Online Web Tutorials[^]in both sites, you type your own code, and it is ok when you reach the wanred result.
12 Jun 2012 by Fabiola Garzoni
Hi ChrisI don`t know Centura but i need to know if it is possible to compile Centura artifacts using dos command line. If it is possible what module of centura i have to use ?Best regardsFabiola Garzoni
3 Dec 2013 by Member 10391371
please guide me what are the references to be added for compilation in asp.net web application...i am building an application similar to this tutorial(link provided) using VS2008, asp.net web...
11 Jul 2016 by Member 3892343
Hi,I have made a c program and want to compile it in VS 2015, I have tried this Walkthrough: Compiling a C Program[^] but the c source file has also dependencies .c and .h files and the compiler gives error that can't find them, I have these dependencies, how can I include them in the...
11 Jul 2016 by KarstenK
At first find these files and copy them into your project directory. You need to include these files in your project via "Add existing files to project". If you you further problems: Google for it or include the full error messages in your question!!!
25 Apr 2012 by JF2015
See here for a solution:http://www.codinghorror.com/blog/2005/04/determining-build-date-the-hard-way.html[^]
25 Apr 2012 by Fred Andres
I am working with Visual Basic in Visual Studio 2010. I want to automatically include the latest compile date and time in the executible. Is that possible?
25 Apr 2012 by OriginalGriff
It's possible, yes - just about everything is - but that doesn't mean it's easy. It isn't, particularly.There is no direct way to do it: there are two options I can think of.1) Access the executable file that started the program at run time and pick up the CreateTime from that. This...
11 Jun 2013 by Marc Hejner
Recently I've added a service reference to e-conomic. However, this meant that the service reference is downloaded and compiled with my project every time I compile.That takes a long long time, sometimes up to a minute, just to compile a relatively small project.This is the web service:...
11 Jun 2013 by Ahmed Bensaid
You can use MSBuild script with a task that calls wsdl.exe
12 Jun 2013 by Marc Hejner
Pasted from SO:You can create a dedicated assembly to host the service proxy. Then reference this assembly in your main project(s). Finally tweak you MSBuild to not compile automatically the service project - assuming it's part of the same solution - and voila!If an update should be made...
17 Apr 2012 by Christopher James Kleinheinz
Hey guys!I have to develop a simple Inhouse-Testframework.For this task we have some test files (every file has one class and 1 to n test methods) in a given directory and we wont to execute all of them.So i have a solution with 2 projects:1: Console Application (TestRunner)2:...
17 Apr 2012 by Sergey Alexandrovich Kryukov
You are using pretty wise method of getting assembly location without messing with file systems. You should run this code under debugger and see what's wrong with "Samwin.UnitTest.dll" and compare with its real location, but I can suggest that the problem is simple: this assembly is not included...
17 Apr 2012 by Christopher James Kleinheinz
Little Hint: LATE BINDINGBecause in my TestRunner console application I never used the Samwin.UnitTest library, it's just needed in the test files. So it wasn't referenced in my application.I just created one instance of the Assert-Class in my console application and TAADAA it's working.
4 Mar 2012 by Tonyto
Coco/R,how to set up in visual studio?I do not know how to use it.I need to write a compiler for C minus.
4 Mar 2012 by Richard MacCutchan
See here[^].
19 Dec 2012 by Y.Mohammed
how can I use compiler as service in visual studio 2010???My project was to create a web service that contain a compiler as a tool ??How could I do that???
19 Dec 2012 by Keith Barrow
There is a technology called Roslyn [^] that exposes the compiler as a service. You can probably exposed a web service as a facade onto this, but your actual requirements are unclear. I haven't used it, it look like you need VS2012 and it is in CTP (i.e. it's not even Beta yet) but hopefully...
4 Jun 2010 by muralekarthick
Hi I am new to C++ world, I am trying to compile a project which is developed in 2000, which works in directx9.0.I am getting fatal errors c1083:fatal error C1083: Cannot open include file: 'dxerr9.h': No such file or directory fatal error C1083: Cannot open include file:...