compilation

Does the C++ code compile to assembly codes?

白昼怎懂夜的黑 提交于 2019-12-03 23:15:00
Does C++ code compile to assembly code? If we have C++ code, will we be able to get assembly code? The vast majority of C++ compilers will convert the C++ source into object files (machine code with enough control information to be linked into an executable). They may actually generate assembly language as an interim step and even use a separate assembler for processing the assembler source, but you'll generally never see that. For example, you have to actually go out of your way to get gcc to generate assembly code (.s file) by using the -S flag. Normally, you would never see the assembly.

How to set the default-directory of compilation in Emacs?

孤者浪人 提交于 2019-12-03 22:43:24
I am coding OCaml under Emacs, I have one makefile in the working folder, and several sub-folders containing .ml files. If I launch M-x compile and make works fine on a buffer of makefile , but does not work on a buffer of a .ml file, it gives me an error: -*- mode: compilation; default-directory: "..." -*- Compilation started at Fri Jan 27 18:51:35 make -k make: *** No targets specified and no makefile found. Stop. Compilation exited abnormally with code 2 at Fri Jan 27 18:51:35 It is understandable because the default-directory is sub-folder which does not contain makefile . Does anyone know

Linkage against libQt5Core

时光毁灭记忆、已成空白 提交于 2019-12-03 22:31:53
I installed Qt5.4 with the online installer (working on ubuntu 14). I'm trying to compile my c++ source and link against libQt5Core but ld throw an error: make g++ -Wall test.o Party.o Communication.o FileParser.o PeerConnection.o ServerModule.o Utilities.o -o party -g -L/home/bush/Qt/5.4/gcc_64/lib -L/usr/lib/x86_64-linux-gnu/ -lQt5Core -lboost_system -lpthread /usr/bin/ld: warning: libicui18n.so.53, needed by /home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libicuuc.so.53, needed by /home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so, not

Speed up compile time with SSD

匆匆过客 提交于 2019-12-03 22:27:36
I want to try to speed up my compile-time of our C++ projects. They have about 3M lines of code. Of course, I don't need to always compile every project, but sometimes there are lot of source files modified by others, and I need to recompile all of them (for example, when someone updates an ASN.1 source file). I've measured that compiling a mid-project (that does not involves all the source files) takes about three minutes. I know that's not too much, but sometimes it's really boring waiting for a compile.. I've tried to move the source code to an SSD (an old OCZ Vertex 3 60 GB) that,

Link libraries compiled by various compilers

喜你入骨 提交于 2019-12-03 21:33:37
I would like to ask in more detail about a answer I recently got here (3rd one): Compiled languages basics If I write in C and MinGW and I link to C++ library compiled by VC - will it work? How do I know in advance? In other words, if I'm able to create without warnings an .exe which links to that C++ .dll, and I'm able to run (just run, no further testing) that .exe, does it mean it worked? Wont it core-dump at some point? To be totally sure, do I need to re-compile the library sources by myself and the link with it? I understand that there might be a problem sometimes with linking C++ and C

Slow test file compilation in Swift 1.2, Xcode 6.3.1

半世苍凉 提交于 2019-12-03 21:17:20
I experienced much slower compilation of the swift unit test files after migrating the project from Xcode 6.2 to 6.3.1. My unit test use Quick/Nimble framework. Also in each test file I have: import MyApp The interesting thing is that when I comment out that import, the compilation is lightning fast. I tested it out on some dummy unit test files, that in fact don't use any of my application's code. But that import makes huge difference for the compilation time. I didn't observe that big impact when using Xcode 6 - 6.2. Do you have any ideas how to improve the compilation speed now? According

Ant debug and ant release failed

你离开我真会死。 提交于 2019-12-03 21:00:06
问题 I am trying to generate apk on command line using ant. I am able to use ant clean but for ant debug and ant release command I am getting following error. BUILD FAILED C:\Android\sdk\tools\ant\build.xml:649: The following error occurred while executing this line: C:\Android\sdk\tools\ant\build.xml:694: Execute failed: java.io.IOException: Cannot run program "C:\Workspace\SampleApp\${aapt}": CreateProcess error=2, Th e system cannot find the file specified at java.lang.ProcessBuilder.start

How Do I Build Lua For Windows Using MinGW and MSYS?

倖福魔咒の 提交于 2019-12-03 20:53:54
问题 I have a book called Beginning Lua Programming which is suppose to go over the raw basics but it is sort of leaving me stranded. Here is an effort to condense 3 pages: QUOTE: The following environment variables are recommended for Windows: UTIL_DIR=c:\program files\utility LUA_DIR=c:\program files\lua\5.1 LUA_CPATH=?.dll;%LUA_DIR%\?.dll LUA_PATH=?.lua;%LUA_DIR%\?.lua The UTIL_DIR variable identifies the utility directory you created in the preceding section. After this, there is a segment

Error: “Class names are only accepted if annotation processing is explicitly requested” [duplicate]

こ雲淡風輕ζ 提交于 2019-12-03 20:39:26
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Java Compile Problem: Class names are only accepted if annotation processing is explicitly requested I have encountered a problem. I am using crimson editor. Could someone explain what this error means? // here is my program package test.rim.bbapps.testcase.lib; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class michaeltictactoe2 implements ActionListener { /* Instance variables */

dynamic code compilation

南楼画角 提交于 2019-12-03 20:06:25
I'm working on a program that renders iterated fractal systems. I wanted to add the functionality where someone could define their own iteration process, and compile that code so that it would run efficiently. I currently don't know how to do this and would like tips on what to read to learn how to do this. The main program is written in C++ and I'm familiar with C++. In fact given most of the scenarios I know how to convert it to assembly code that would accomplish the goal, but I don't know how to take the extra step to convert it to machine code. If possible I'd like to dynamically compile