Click here to Skip to main content
15,891,253 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 Updated

Compiler 

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...
7 Dec 2010 by #realJSOP
Macros are compile-time features, not runtime features.One way to accomplish this would be to include one or more DLLs in your project that turn one various features, and then base those features' availablity on the presence or absence of the DLLs. Of course, there are many other ways,...
21 Dec 2010 by #realJSOP
I found this with google (you know - that free search engine at www.google.com):http://support.microsoft.com/kb/241849[^]
8 Jan 2011 by #realJSOP
I suggest that you continue to use google to find the documentation for that compiler, which really shouldn't be too hard since it's free, and reasonably well-documented.
9 Jan 2011 by #realJSOP
BTW, were you aware that you can use the command line compiler that comes with Visual Studio as well?EDIT ==============Why distribute it with your app when a single line of text will fix the problems:"Requires Visual Studio 20xx."At that point, all you have to do is prompt the...
12 Jan 2011 by #realJSOP
I doubt if you have the time/skills to modify the compiler itself, but you can change the switches used to compile your application (to make it create a certain kind of executable (or library).I don't personally know anything about GCC, so you're probably going to have to rely largely on the...
14 Jan 2012 by 01.mandar
i have set up target fs on /home/myself/filesys/bin..etc//GCC compile:host $ arm_v5t_le-gcc hello.c -o helloRun:target $ cd /opt/hellotarget $./helloi have installed opencv2.3 on host ubuntu machine now i want opencv to be ported to DM6446 so i follow 1 uncompress opencv2.3...
22 Aug 2014 by _Asif_
I have looked over this issue. You need to do following to get what you want.* On Your test machine open VS* Goto: Project->Properties->Configuration Properties->C/C++->PreProcessor* Add _TEST_MACHINE at the end in Preprocessor Definition* Change your macro like this#if _TEST_MACHINE...
25 Nov 2017 by abdou_31
How can i write a program using C# and visual studio 2017 that compile a code source writing on C programming, How can i do that? any simple solution to write this program? if not , so how can i use flex and bison for that program ? If C# didn't do this job, what is the perfect language that i...
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.
22 Nov 2010 by Abhinav S
This[^] post might just help you.
4 Apr 2011 by Abhinav S
Looks like the script is not able to pick up the nant.cs file. YMake sure your file location is correctly specified.
5 May 2011 by Abhinav S
You might want to start from here.
9 Aug 2011 by Abhinav S
Use the CSharpCodeProvider class[^] to compile your code programtically.
3 Apr 2013 by Abhinav S
You can use the equivalent of MakeFIle in Visual Studio.This is called MSBuild[^].
18 Dec 2012 by Abhishek Pant
to install g++-4.1apt-get install g++-4.1{,-multilib}for more help VMware[^]Installing g++ on Windows and Ubuntu Linux[^]
8 May 2014 by Adi5555
i have to make a application which can write the description of any program wrtten by the user.the program can include the functions prototype or definition ,swith case,if else,for loop,do while loop and while loop.the application read the program and write the functionality of the programfor...
13 Aug 2019 by Advik Raj
According to my logic, I think it is possible to convert one language to another, without a transpiler. C code: #include int main(){ printf("Hello, world!"); return 0; } 1. I have converted C code into Assembly code using MinGW (GDB) in CMD. This C program is a simple Hello-World...
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:
3 Jun 2010 by Aescleal
At the risk of sounding like the daft paper clip that used to give you advice in Microsoft Office..."Hey, it looks like you want to access a structure field through a pointer and offset..."In C you're forced to use something that's got loads of casts in it - there was an example of how...
3 Jun 2010 by Aescleal
With all the compilers I've used the heap isn't used for holding local variables, either when they're defined or passed to functions.HOWEVER there's no reason why a compiler internally couldn't generate code to do this if it didn't change the observable behaviour of the program.And don't...
8 Jun 2010 by Aescleal
The only time structure padding (and alignment) is important is if you're generating data that is transferred to something that makes different assumptions about the padding.So if you have memory mapped hardware you might get a surprise if you naively map a structure over the hardware's base...
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...
28 Jan 2016 by Afzaal Ahmad Zeeshan
If apt is working and that is what you are going to use on Kali Linux (which I do not recommend to Linux beginners, as Kali Linux is a very advanced tool for security experts to try out!), then just execute the following command:sudo apt-get install g++However, since that command (the...
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...
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...
24 Apr 2021 by Aghast (nj)
Command (1) compiles the .c file to a .o (object) file, then stops. Command (2) compiles the .c file to an object file, then links the object file with the C standard library to produce an executable file named file. Both commands drop their...
11 Jun 2010 by ah123ah
I am converting an MFC application for deadlock detection in to Simple console application. During this process I found many errors saying like:error C2365: 'CmdLockMutex' : redefinition; previous definition was 'enumerator'I am unable to remove this error.Kindly if someone could help...
24 Apr 2021 by Ahmad Qassym
1) gcc -c file.c -o file.o 2) gcc file.c -o file please if u gonna to answer the question ,try to give an simple answer as much as possible! What I have tried: ......................................................
15 May 2021 by Ahmad Qassym
what does the statement int x[10] = {0}; mean ? what confuses me is that the arry is in size of 10 ,it means it must contain 10 elements ..but why we can set it to only one element {0} without to get an error ? the language is c! What I...
11 Jun 2013 by Ahmed Bensaid
You can use MSBuild script with a task that calls wsdl.exe
24 Apr 2012 by ahsanriaz1K
Hi,I am compiling some code through cmd.exe on VS2008 compiler. I am getting this error."error while loading shared libraries: MSV CR90.dll: cannot open shared object file: No such file or directory"I am searching through google.Looking for your response.....
17 Mar 2012 by Ajay Bharath
Hi ...How to do lex and yacc program for canonical lr parser?..Thanks
7 Dec 2010 by Alain Rist
Hi Rajesh,Use the Visual Studio Configuration Manager (in Build menu) to create different project configurations, see How to: Create and Edit Configurations[^].Use compile time definitions to adjust specific configuration features.cheers,AR
11 May 2011 by Albert Holguin
Here's a decent tutorial on what you're experiencing:http://mcdermottcybersecurity.com/articles/64-bit-device-driver-development[^]The DDK files are dependent on environment variables set by other files (read article and you'll see what I mean).
19 May 2011 by Albert Holguin
operator new will return a pointer to an object, so you need to give it a pointer to store it to:CClass *myClass = new CClass();since you're allocating this on the heap, you will need to deallocate by hand so you don't have memory leaks:delete myClass;
10 Mar 2013 by Albert Holguin
When you use an external library, you have to include the lib file and dll (if dynamic, lib only if static). The header simply has the definitions but the compiled functions are inside the library file which is needed by the linker.See...
22 Dec 2016 by Albert Holguin
Well, the C++11 standard explains how an int to bool conversion[^] should occur... it doesn't however, specify whether a conversion should be done automatically and without warning/error, so that appears to be a decision that they made to do it one way or another.It should be noted that in...
4 Apr 2011 by Alex Ghassan
HiThe following is how my NANT Build File looks like: nant build files.
20 Feb 2024 by Alex Rakov, Alexandre Bencz
ELENA is a general-purpose, object-oriented, polymorphic language with late binding
3 Jul 2012 by Alexandre Bencz
Hi, I whant to know, how the C++/CLI compiler works, I generate 5 tree dumps of one simple code in C++/CLI3 tree dumps I generate with this simple code ( pure, safe CLR): using namespace System; int main(array ^args) { ...
28 Dec 2012 by Alexandre Bencz
Hi :)I'm developing a C like compiler and I whant to know, how it's work the include system... I mean, how the compiler works with the system includeThe compiler read the entire code, and stores all includes found in one list and parser the includes, after finish the reading the current...
13 Apr 2013 by Alexandre Bencz
Hi :)I'm doing some research on compiler development, and am wanting to understand more about how the system works parsing using DFA tables. I see the theory of the operation of DFA table with parsers LALR, LL, LR, but I just can not understand.As I am studying, I do not want to use a...
24 Jul 2013 by Alexandre Bencz
I am studying the bison ( yacc ), but I have a doubt, how can I make processing files included in the source (# include) and how can I create functions and to analyze and yacc generate the code for these functions ?I made a simple test code: https://github.com/bencz/YaccStudybut, don't...
28 Aug 2017 by Alexey Shtykov
A few words about function templates
9 Mar 2019 by AlexeyYakovlev
This paper demonstrates a technique of building Sprache parsers using grammar inheritance.
11 Nov 2013 by altomaltes
An insigth in the heap "C" memory system.
1 Oct 2014 by amir ramezani
you can use LLVM to make your own compilergohere
28 Jul 2023 by AmrDeveloper
Introduce GQL (A Git Query Language) to perform SQL like queries on .git files
7 Aug 2011 by Andreas Gieriet
The following grammar (given in EBNF) accepts the same language:S = b { b | x } { a b { b | x } } .Not really answering your question, though. This one is LL(1).You might take any decent textbook on that topic and check the definitions for LR(0) and SLR(1).Of the given...
28 Dec 2012 by Andreas Gieriet
If you want to parse and process any language, you probably need to read some text books first.E.g. C-Programming Language[^], or C11 Language Draft[^], etc.E.g. the latter specifies the #include semantics as follows:[...]6.10.2 Source file inclusionConstraintsA #include...
23 Feb 2014 by Andreas Gieriet
I don't know ANTLR well enough, but my suspicion is that ANTLR has a lookahead predicates that allow to tell the lexer to only skip new-lines that are *not* followed by optional whitespaces followed by ///.E.g. something likeWS1: ( ' ' | '\r' | '\t' ) -> skip;WS2: ( '\n' {...
7 Dec 2010 by Andrew Phillips
This is a large topic and there are many considerations. For example, at one extreme you can have one executable and use run-time flags to control which features are seen. At the other extreme you can create different release configurations (see below) that define macros (for conditional...
21 Jun 2011 by AndrewG1231
Hi everyone,My compiler keeps telling me I have a linker error:libpng.lib(pngerror.obj) : error LNK2019: unresolved external symbol __iob referenced in function _png_default_errorI think this is referring to libpng library, but I am unsure what it is telling me to do to fix it? Is...
9 Apr 2010 by Ankur\m/
15 Oct 2012 by AnnieM
Hi,I need to create Service/scheduler to compile and deploy a different .net projects.I have been looking at various tools like Cruisecontrol, Octopus, Puppet etc.Can somebody please suggest which one is the best and easy to user with multiple .net projects of possibly different version...
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.
27 May 2010 by Anu Koshy
May be you have included "CDragDrop.h" file before "stdafx.h", as follow:#include "CDragDrop.h"#include "stdafx.h"to fix the problem, write all the file inclusions after the #include "stdafx.h" statement.It should be like this:#include "stdafx.h"#include "CDragDrop.h"
27 Nov 2011 by Anuja Pawar Indore
Refer this threadhttp://stackoverflow.com/questions/821086/resources-for-writing-a-c-sharp-compiler-for-class[^]
28 Apr 2010 by Arindam Tewary
When you write bitwise shift operation equivalent microoperation takes only one micro-operation to be performed by the ALU(CPU). It takes binary representation of the value supplied and performs a single "shift" micro operation.But when you write a division(float) it is converted into either...
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
11 Oct 2013 by ASP.NET Community
The var keyword is a new keyword in Dot net Framework 3.5 that can infer its data type from the resulting set. Var keyword For instance, look at the
14 Nov 2011 by AspDotNetDev
It really depends on the language. In theory, a compiler or interpreter could ignore a syntax error and compile or intepret the rest of the valid code. In practice, however, interpreted languages will sometimes ignore syntax errors and skip over the invalid code. In languages like JavaScript...
12 Feb 2014 by Balaji rayal
how do i create online compilers for c++ program in my asp.net page using c# programI want to create a asp.net page. In htat i would like to add comilers for for c++ program using C#.net.Please provide me some examples and sample projects and codes.Thanks in Advance
1 Mar 2012 by barneyman
you'll should find it's the version of the SDK that's dictating the presence or absence of those tags ...... or, you're creating/importing a tlb file directly from the com object at the compile timeIf it's the latter, then yes, IE, is loosely involved in your compile You need to work...
22 Nov 2010 by BarryPearlman
I get the following when debugging my aplication: "Intellisense: #error directive: Please use the /Md switch for AFXDLL builds."I am using MFC under VS2010 and I understand what it wants me to do. The question is how or where do I set the /Md (and other) switches?Thanks,Barry
7 Jun 2013 by besmith2
I would like to create an install for a console application that asks for an application key then compiles a console application with the application key compiled into the resulting exe. I have never used a Visual Studio Installer project so I don't know where to start or if it can be...
21 Apr 2011 by BillW33
Something else to consider is to make sure that the target machine has the version of .NET installed that you are targeting with your VS2010 project.
17 Oct 2021 by BillWoodruff
I like to think of reserved words as sacred cows, and contextual keywords as ordinary livestock :) imho, all cows should be sacred (no reference to Hinduism intended). Isn't the idea of unique names (without multiple meanings in different...
13 Jan 2022 by BillWoodruff
I thought using 'pragma for suppression was weird enough ... until I ran across ... I have a function that returns a Tuple in the form of: (IEnumerable, IEnumerable): there are two cases where a null result may terminate...
3 Jun 2010 by Brian R. Bondy
The stack is used when you do not use new or malloc or other related memory allocation functions explicitly. For example:int x;//
11 Jun 2010 by Brian R. Bondy
Sounds like you need a header guard around your definition of `CmdLockMutex` (Add `#pragma once` at the top of its .h file.). Or rather you have a naming conflict.Maybe you have something like this:enum MyEnum { MyEnumVal1, MyEnumVal2 };//....class MyEnum{ };
26 Sep 2012 by buckmunsterfullerene
I know this is going to sound a bit strange. But I have a question that tricks me.Last Month, I have been trying to make an interpreter of my own with the name UCI made in Borland C++. It uses My own technology called Parallel Hexa Conversion and fortunately, was a success. Now I would like to...
21 Aug 2014 by C3D1
Hey out there,i have a question about Preprocessor makros.is there a way to do something like:#if COMPUTER_NAME == _T("TestPC") // only on the test computer #import "C:\Path\To\3thParty\Library"#else // on our dev computers #import "D:\Dev\Path\To\3thParty\Libraries"...
28 Jan 2016 by chandanadhikari
hi,i have not worked on 'kali' distro but i hope the process remains the same across distros when doing it from terminal:1). sudo apt-get update2). sudo apt-get upgrade2). sudo apt-get install g++ (installs the most updated package)then you can check the list of compiler packages...
8 Jun 2010 by Charles Keepax
Many compilers will come with ways to set the alignment size either globally or for specific structures. Setting this to one will remove that padding. Check your compiler documentation for this. For example here is the appropriate documentation for GCC: GCC Attribute...
16 Sep 2013 by CHill60
There are some comments to this post[^] that will point you in the right direction - specifically a couple of good books on compiler design.Designing an Operating System and designing a Compiler are two very different things and not at all related in the way that you suggest ... it's not...
5 Dec 2013 by CHill60
Micro$oft have a How-to for that :-)http://msdn.microsoft.com/en-us/library/zzszcehe.aspx[^]
28 Apr 2014 by CHill60
Have a look at the samples on http://www.regular-expressions.info/reference.html[^]Here for international phone number matching https://support.sonus.net/display/UXDOC31/Regular+Expressions+for+Number+Matching+and+Transformation[^]
1 Apr 2015 by CHill60
Not something that can be answered in a "Quick answers" forum!However similar assignments have been set before - see the responses to this post Where I Have To Start Building A Compiler?[^]
29 Aug 2012 by ChineseGuy
I download the file in this webpage:[^]There is a dll project called MimeTeX,it's orginally built by VS2003I compile the project using VS2010 and succeed. But I cant see any export funtions in dumpbin andit doesnt work when I use other programs to call this dllWhy? Must I use...
29 Aug 2012 by ChineseGuy
I have used a tool to convert VS2003 to VC6:VC++7 to VC++6 project converter[^]
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 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...
15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
11 Jun 2010 by Christian Graus
You've defined CmdLockMutex more than once. Perhaps you've got an issue with your #include files ? Is this an MFC class and you've not got MFC linked to your console app ? Hard to say more without seeing code.
20 Jul 2012 by Christian Graus
There are some, but why on earth would you want them ? None are as good as VS.
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 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.
15 Jun 2011 by Chuck O'Toole
"C" does not have "bool", "true" or "false". "C++" does have them (as does "C#") as recognizable data types. The Visual Studio IDE editor highlights "bool", "true", and "false" in blue because it does recognize them as language keywords and even does that in files with the ".C" file...
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[^]
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...
6 Jul 2021 by col bur (solder fumes.cs)
here is the file that it is getting all the errorshttps://github.com/openbeast90/delude/blob/master/delude-logger/Resources/Webhook.cs if you have any questions about the project ask so i can help you help me or just look through the rest of the...
22 Apr 2023 by Coral Kashri
How compiler helps code run faster and generates warnings in single cross-compiler way
28 Apr 2010 by CPallini
Josh Gray wrote:* Is there likely to be a tangible benefit to doing this or would a compiler (gcc in my case) make this optimisation?VC++ compiler takes care of such optimization (I see no div operation).I guess gcc do the same, you may verify it using the -S switch and looking at the...
7 Jan 2011 by CPallini
If you want to learn how to build a simple compiler (without using tools) then "Let's build a compiler, by Jack Crenshaw"[^] may be a worthy reading. :)
27 Nov 2011 by CPallini
You may split your learning task in two fields:How to build a compiler (there are many many books about).Gain a deep knowledge of the programming language used to actually build the compiler (and, again, there are many many books on C# programming language).You may also find useful a tool...
8 Jan 2012 by CPallini
That's the output of a lexical analyzer. You may write your own lexical analyzer or use a tool, for instance flex[^].