compilation

Gradle compile dependencies not included in Jar

孤街浪徒 提交于 2019-12-24 04:25:30
问题 I have a jar, build-plugins.jar with a gradle plugin that is build with this in build.gradle: apply plugin 'java' dependencies { compile gradleApi() compile localGroovy() compile('eviware:maven-soapui-plugin:4.5.1') compile('org.antlr:stringtemplate:4.0.2') compile('commons-io:commons-io:2.4') compile('joda-time:joda-time:2.1') } This builds build-plugins.jar. And the project that consumes the plugin references the plugin jar by file apply plugin 'thepluginwahoo' buildscript { dependencies {

Use of Java generics could be hanging the compiler

旧城冷巷雨未停 提交于 2019-12-24 03:39:19
问题 I have about 55 Java interfaces and 5 abstract classes. Each declaration uses the same set of generic parameters: it lists the approximately 60 declarations so each implementation knows a specific type of each other implementation and substitute this type in method parameters and returns as appropriate. It appears that this (perhaps over)use of generics is causing the compiler to hang. The compiler throws an OutOfMemoryError, but does not appear to terminate. Considering my circumstance, a

Trouble compiling Windows DLL using Golang 1.10

拜拜、爱过 提交于 2019-12-24 03:21:56
问题 I'm having issues building a Windows DLL in Golang 1.10, which is supported in this latest version: "The various build modes have been ported to more systems. Specifically, c-shared now works on linux/ppc64le, windows/386, and windows/amd64;" (Source: https://golang.org/doc/go1.10) I have a very simple program right now ( main.go ) that only exports one function "Test", but am having issues when using the following "go build" command: env GOOS=windows GOARCH=386 go build -buildmode=c-shared

What is the best way to check if I have a 32-bit or a 64-bit Linux?

自作多情 提交于 2019-12-24 03:06:04
问题 I have to check in CMake script if I have a 32-bit or a 64-bit Linux in order to know how to build a C++ program. Which command is the best choice : getconf LONG_BIT arch uname -m 回答1: Using CMake one possible way is to check the CMAKE_SIZEOF_VOID_P variable: if (CMAKE_SIZEOF_VOID_P EQUAL 8) message (STATUS "Compiling for 64-bit") endif() 回答2: I'd propose to use any two of the methods together . (or all three) Just for the backup, and to be cross platform. Another Linux distribution can use

Can't compile Arduino CapSense example

无人久伴 提交于 2019-12-24 02:54:12
问题 I'm trying to work with the CapSense library for Arduino. However, I can't manage to run the example included with the package, called "CapSenseSketch". When I try just opening the file and running it (I've tried both Arduino 1.0 and 1.0.1), I get a compiler error that says 'CapSense does not name a type", and also CapSenseSketch.cpp:1:22: error: CapSense.h: No such file or directory CapSenseSketch:11: error: 'CapSense' does not name a type CapSenseSketch:12: error: 'CapSense' does not name a

How can i Compile a C program on Dos prompt using tcc and tc

核能气质少年 提交于 2019-12-24 02:42:28
问题 I want to compile c program on dos prompt using tcc as well as tc without using c editor. please give the full procedure. 回答1: I would look at the TCC documentation, specifically the quick start guide, provided on the TCC web page. Assuming you have some source code already, a compilation is as simple as tcc -o executable.exe sourcefile.c You can also run a C file directly with the -run option, as in tcc -run sourcefile.c 回答2: you can run code without using an editor by using tcc -run - Using

Compile angularjs template to show on a notification

三世轮回 提交于 2019-12-24 02:37:06
问题 I want to use this library(http://pinesframework.org/pnotify/) on my angularjs project to show error notifications here is a simple usage for it : $.pnotify({ title: 'Oh No!', text: text OR HTML, type: 'error' }); What i want is showing the errors i got as JSON on a notification, but i cant add html with angular tags in this notification. This is what i tried to do (Im calling it from a service and i am passing the $scope to the function): scope.errors = {"errors":[{"text":"error1"},{"text":

Shared libraries C++ Makefile

浪子不回头ぞ 提交于 2019-12-24 02:27:30
问题 I need to compile fat binary file to be able use it on another linux machine. But there are some libraries missing so as I understand I should compile it with some -shared options. But I don't understand how to configure a Makefile for that. Currently my makefile looks like this: CC = g++ CC_FLAGS = -std=c++11 -O2 -static -Wall EXEC = cpp_server SOURCES = $(wildcard *.cpp) OBJECTS = $(SOURCES:.cpp=.o) LIBS = -lpthread -lmicrohttpd -lz $(EXEC): $(OBJECTS) $(CC) $(OBJECTS) -o $(EXEC) $(LIBS) %

Compile .java file from within a java program?

不打扰是莪最后的温柔 提交于 2019-12-24 02:14:44
问题 I found this code: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if(compiler.run(null, null, null, fileName) != 0) { System.err.println("Could not compile."); System.exit(0); } However, this returns a NullPointerException Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at net.foxycorndog.foxy.compiler.Compiler.compile(Compiler.java:25) at net.foxycorndog.foxy.compiler.Parser.parse(Parser.java:41) at net.foxycorndog.foxy.Foxy$ActionHandler.actionPerformed

Windows 10 - Compile C++ in cmd

天涯浪子 提交于 2019-12-24 01:42:09
问题 I have a main.cpp file in my C:\Documents folder. What is the command that I need to type in order to compile this program in C++11? And also, is there a way to include options like -Wall , -Wextra , or -Werror , similar to how you can do so in Ubuntu? 回答1: Assuming you have GCC: Go to the Start and type command prompt . Once the option is displayed, make sure that you right click it, and run it as an administrator. You need admin rights, in order to run the .exe file that is generated after