compilation

Fail on Post-Build event?

白昼怎懂夜的黑 提交于 2019-12-11 07:44:56
问题 Is there a way to force the build to fail given certain conditions in the post-build event? The package I'm working with runs jslint and a few other solutions all together on post-build, I would like Visual Studio to fail if jslint produces an error. I am aware of the jslint plugin for VS2010 that will fail the build on error, but my requirements are restricting me to using the packaged bugchecking solution in which jslint is contained. 回答1: Post build events are basically batch scripts - you

GCC not working during compiling haskell programs on Windows

非 Y 不嫁゛ 提交于 2019-12-11 07:41:20
问题 I'd like to compile a Haskell project with a .cabal file under windows. I have installed the Haskell Platform and Cygwin. One of the dependancies is time , which fail to build during the cabal install command. The error message is the following: checking for gcc... C:\PROGRA~1\HASKELL~1\826561~1.1\mingw\bin\gcc.exe checking if the C compiler is working... no configure error: C compiler cannot create executable So I downloaded another gcc withing Cygwin that, I suppose, will work better.

Order of imports seems to matter for compilation to succeed?

我怕爱的太早我们不能终老 提交于 2019-12-11 07:40:08
问题 I'm writing a unit test for some Java class in Eclipse. I always let Eclipse handle my imports automatically, and it orders them according to whatever default scheme. Now, I have the following situation. The unit test builds and runs just fine in Eclipse. However, when I build the tests on the command line (using some Ant targets), javac complains that it can't find one of the classes I've imported. Since I'm testing something with caching, the relevant bits of the test file (Test.java let's

Wrapping GNU makefile with another makefile

柔情痞子 提交于 2019-12-11 07:36:34
问题 This is following question. I have Makefile.real ( Makefile from prev question): all: a b a: echo a exit 1 b: echo b start sleep 1 echo b end Now I want to create Makefile that is simple wrap of Makefile.real : It calls make with Makefile.real with the same args as it was called It should print error message id Makefile.real fails This is my goal - print error message in the end of parallel make (see question) Therefore following commands should terminate with error message: make -j1 a b (1)

Trying to get stasm to work on Ubuntu

。_饼干妹妹 提交于 2019-12-11 07:26:44
问题 I have the below in a Cmake file: add_library(stasm STATIC IMPORTED) set_property(TARGET stasm PROPERTY IMPORTED_LOCATION /media/Data/sdks/stasm3.1/linux/libstasm.a) target_link_libraries( StasmOpencvExample ${OpenCV_LIBS} stasm) I generated the libstasm.a by doing: How to create a static library with g++? , the first answer, taking all of the .o files from the linux folder and putting it into an archive. but when i run make on my project i get: Scanning dependencies of target

UnsatisfiedLinkError: Couldn't load … from loader

青春壹個敷衍的年華 提交于 2019-12-11 07:25:13
问题 I'm using IntelliJ in Windows 7 and after a recent sudden change to my development system (not device) I'm stuck with the UnsatisfiedLinkError thrown by System.loadLibrary() for loading a native .so library java.lang.UnsatisfiedLinkError: Couldn't load ... from loader I tried every fix suggested on SO with no success including: Rebuilding the app and recreating modules structure from scratch Cleaning IntelliJ cache and restarting Intellj I have my .so libraries in the libs folder libs armeabi

Errors when using weka with android

不羁岁月 提交于 2019-12-11 07:20:04
问题 I tried to add weka with android but got these errors. I should say that when I run the class that contain all my weka code it runs perfectly but when I call this class using one of the activity I get the errors. Invoke-customs are only supported starting with Android O (--min-api 26) Message{kind=ERROR, text=Invoke-customs are only supported starting with Android O (--min-api 26), sources=[Unknown source file], tool name=Optional.of(D8)} I looked for a solution i found that you have to put

Questions on how compiled programs interact with the operating system

狂风中的少年 提交于 2019-12-11 07:14:20
问题 It's been quite some time, I have been programming in C/C++, but some areas still elude me. Perhaps I haven't been reading from well written and authoritative material. (1) In Linux/Unix, is there a limit on how large user programs can be? Maximum size of stack a program can have? Max amount of memory in a heap a user program can use? (2) I understand that a C executable has data section, code section & stack section. If the program is getting into many recursive calls, it would need a large

How to always compile a cpp file with Eclipse?

跟風遠走 提交于 2019-12-11 06:58:36
问题 I have included a unix timestamp __DATE__ in one of my cpp source files to indicate the build date of my program. Naturally with default setups it compiles the file only when I change it but now I'd like to have it always compiled. I tried to search through the project settings but it seems that this would need deeper understanding of the compiler. I'm using Eclipse with g++. I tried to google and search for an answer but I found it difficult to find good keywords for this. Also is there a

Building and running a java application from Netbeans

只谈情不闲聊 提交于 2019-12-11 06:49:22
问题 I've recently started using NetBeans, coming from Eclipse. I have a simple implementation of SnakeYaml (a yaml parser for java) I am trying to test. It is contained in a main method. When I try to run it (F6) like I would in Eclipse, I get a successful build but no output. Instead, to run my program, I need to first build (F11), then run (F6). Is there a way for my project to be automatically built when I try to run it. Note: Netbeans actually tells me I don't have to build to run from inside