compilation

How do I get emacs to change the compilation command on a per-buffer basis?

五迷三道 提交于 2020-01-07 06:37:15
问题 Suppose I have two code files, one is a small test script, the other is my main piece of code (both are c++ code files). I would like emacs to use different compilation commands for each of them (for example "make test_script" for one and "make release" for the other). What's the best way to do this? 回答1: You can use the compile-command local variable to the buffer. For instance, in one C++ source code: // Local Variables: // compile-command: "make release" // End: and you can change that in

Running MSVC compiler from Java code gives error

别等时光非礼了梦想. 提交于 2020-01-07 06:14:29
问题 I am trying to compile some C++ source file with MSVC2008 compiler from Java code. E.g. i have a path to the source file and the path to ms compiler. I need to run compiler and get the executable file path or an error status. But everything i get so far is "No include paths defined" error and the exit status of 2 . Googling a bit gave me the vsvars32.bat file path which fixed this error when running from a raw cmd . But it seems that Java has its own environment, totally different from the OS

Compile actionscript using mxmlc compiler

天涯浪子 提交于 2020-01-07 05:05:47
问题 How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? Consider the following - com.nuaavee::MainClass com.nuaavee.utility::SomeUtility MainClass imports SomeUtility class. Is there a way to compile these classes keeping MainClass as the main class to generate a swf? 回答1: Here is a solution that has been tested to work - mxmlc -output main.swf src/com/nuaavee/MainClass.as -source-path src/ 回答2: If it's just a Utility class, it should be

Compile actionscript using mxmlc compiler

吃可爱长大的小学妹 提交于 2020-01-07 05:05:11
问题 How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? Consider the following - com.nuaavee::MainClass com.nuaavee.utility::SomeUtility MainClass imports SomeUtility class. Is there a way to compile these classes keeping MainClass as the main class to generate a swf? 回答1: Here is a solution that has been tested to work - mxmlc -output main.swf src/com/nuaavee/MainClass.as -source-path src/ 回答2: If it's just a Utility class, it should be

Creation of.so of files

核能气质少年 提交于 2020-01-07 04:15:07
问题 There is a set with - files with extension.с: avl_tree.c, buf_read.c, db_prep.c, file_process.c, global_header.c, traverser.c. Used include files are in folder/usr/gcc/4.4/bin/include except for jni.h, and libraries are in folder/usr/gcc/4.4/bin/lib. How from them to create.so the file (if it is possible specify all options in this command)? It me interests in communication by creation of native of methods by means of JNI. 回答1: You really should read the documentation of GCC. Notably invoking

trouble compiling with custom tensorflow gpu op

纵饮孤独 提交于 2020-01-07 03:24:15
问题 I am a newbie at c++, but managed to work out an original new cpu op for tensorflow. Now I would like to work out a op for the gpu. I have a little experience working on open-cl. I am following the guide here: https://www.tensorflow.org/versions/r0.11/how_tos/adding_an_op/index.html#gpu-support below is my c++ code, followed by the cuda file. I don't do anything with this code. It compiles correctly but every time I try to run it I get a core dump. For the purpose of debugging I have removed

Compile static version of QT + OpenSSL Support

烂漫一生 提交于 2020-01-07 02:37:08
问题 I have downloaded source files of qt-everywhere-opensource-src-5.8.0 from here: https://download.qt.io/snapshots/qt/5.8/5.8.0/latest_src/ I want to compile it with support for Static version of QT + OpenSSL I have installed QtFramework(qt-opensource-windows-x86-mingw530-5.8.0) and Win32 OpenSSL v1.0.2k downloaded from here: https://slproweb.com/products/Win32OpenSSL.html What arguments need? 来源: https://stackoverflow.com/questions/41938379/compile-static-version-of-qt-openssl-support

Node.JS installing CLD

故事扮演 提交于 2020-01-07 01:49:49
问题 I'm trying to install the CLD package in my notebook, but keep receiving error in compilation. Some basic info about my installation: OS: Win 7 Professional (64bit) Visual Studio: 2012 Command used: npm install cld --msvs_version=2012 Node.JS version: 5.4.0 Virtual Memory on C drive and E drive are both between 4GB to 8GB. With reference to MSVS's support site on error C1060, I have tried option 2 and 3 but no luck. Would anyone be able advise on this error? Detailed log is as below. E:\node

Multiple definitions error in C++

泪湿孤枕 提交于 2020-01-06 23:49:16
问题 I'm writing a C++ program where each file has it's own set of global variable declarations. Most of these files make use of global variables that were defined in the other files using extern. Here's an example similar to my program: Main.cpp #include "stdafx.h" #include <iostream> #include "Other_File.cpp" int var1; int var2; int main() { var1 = 1; var2 = 2; otherFunction(); var4 = 4; // From Other_File.cpp std::cout << var1 << " " << var2 << " " << var3 << " " << var4 << std::endl; return(0)

how add a debug to a kit in QT for msvc2013

℡╲_俬逩灬. 提交于 2020-01-06 20:17:16
问题 I just made a clean instalation of Qt5.5 with QtCreator and Visual Studio 2013 Express for desktop (C++). However there is no Auto dettected Debug option on the default kit. Is that a normal behaviour ? How can I debug my msvc2013 Qt application? Should I mannualy add a new debbuger? Here is screenshots of my Qt. 回答1: You have to have an appropriate Windows SDK installed as SDK 8.1 in my case: It expects to find CDB.exe matching the bitness of your project 32/64 bit. And in case if it is