compilation

Linkage against libQt5Core

萝らか妹 提交于 2019-12-05 12:52:28
问题 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

package javax.ejb does not exist inspite of jar file in classpath

徘徊边缘 提交于 2019-12-05 12:47:04
I'm trying to compile a java program using command javac -d build src/*.java -verbose It returns me the following: src\Currency.java:5: package javax.ejb does not exist import javax.ejb.*; ^ src\Currency.java:7: cannot find symbol symbol: class EJBObject public interface Currency extends EJBObject { ^ I'm using jdk1.6.0_35. CLASSPATH contains C:\wls1036_dev\modules\ which contains javax.ejb.jar What could possibly be the problem? I faced the same problem . You need to add javaee5.jar to you class path . For example I imported an ejb project and then realised I was using a version of Netbeans

C++ how to manage dependencies (use libraries from github for example)

[亡魂溺海] 提交于 2019-12-05 12:28:19
问题 I'm very new to C++ world, so please, sorry me for such a dummy question. I google a little, but wasn't able to find proper answer. My question is fairly simple - how should I use lib's in C++ world. For example in Java - there is maven and gradle for this task. In Python - I use pip . In javascript npm and bower do all the stuff. In C# you use nuget or just adding DLL lib to your project. But looks like in C++ things isn't such easy. I found a tool, called conan but ammount of libs they have

howto call c# (mono , .net) methods, delegates from native c

青春壹個敷衍的年華 提交于 2019-12-05 12:26:53
is it possible to call c# methods written in managed code (maybe in a class or a library) from a native c code (and how)? thx edit: with "c#" i mostly refer to mono or even portable.net and the OS is Linux Your C code can define functions to register callbacks. The C# code can P/Invoke these functions, and pass managed delegates as arguments. The marshalling code will transparently transform these to C function pointers. Alternatively, approaching it from the C side, you can use the Mono embedding API to load assemblies, look up MonoMethods, and invoke them. Using the embedding API is much

Build OpenCV with OpenCL support

不打扰是莪最后的温柔 提交于 2019-12-05 12:25:06
in CMake, I built OpenCV with OpenCL Enable ON(It automatically detected the OPENCL_INCLUDE_DIR path but the OPENCL_LIBRARY was empty, even after clicking config. for OPENCL_LIBRARY i don't see browse button either .. after generating opencv binaries then i run the below code #include <iostream> #include <fstream> #include <string> #include <iterator> #include <opencv2/opencv.hpp> #include <opencv2/core/ocl.hpp> int main() { if (!cv::ocl::haveOpenCL()) cout << "OpenCL is not avaiable..." << endl; else cout << "OpenCL is AVAILABLE! :) " << endl; //this is the output cv::ocl::setUseOpenCL(true);

Why C# 4.0 tolerates trailing comma in anonymous objects initialization code? [duplicate]

半世苍凉 提交于 2019-12-05 11:52:01
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Inline property initialisation and trailing comma Working on one of my projects (C# 4.0, Visual Studio 2010), I've accidentally discovered that code like var obj = new { field1 = "Test", field2 = 3, } is compiled and executed OK without any errors or even warnings and works exactly like var obj = new { field1 = "Test", field2 = 3 } Why does compiler tolerate the trailing coma in first example? Is this a bug in

How to compile a C++ program as 64-bit on 64-bit machine?

我怕爱的太早我们不能终老 提交于 2019-12-05 11:25:37
问题 Perhaps a very trivial question: I need to compile a program as 64-bit (earlier makefile written to compile it as 32-bit). I saw the option -m32 appearing in command line parameters with each file compilation. So, I modified the makefile to get rid of -m32 in OPTFLAG , but again when the program compiles, I still see -m32 showing up and binaries are still 32-bit. Does this m32 come from somewhere else as well? 回答1: -m32 can only be coming from somewhere in your makefiles, you'll have to track

Why does the Java compiler sometimes allow the unboxing of null?

穿精又带淫゛_ 提交于 2019-12-05 11:14:43
问题 For example: int anInt = null; fails at compile time but public static void main(String[] args) { for (int i = 0; i < 10; i++) { System.out.println("" + getSomeVal()); } } public static int getSomeVal() { return new Random().nextBoolean() ? 1 : null; } fails (usually) at run time. Trying to return just null will also result in a compile error, so I assume there is something about having multiple paths that causes the compiler to infer that null is potentially an autoboxed int ? Why can javac

Trying to compile vim on OS X?

别来无恙 提交于 2019-12-05 10:46:06
Following this writeup ... The compiled binary seems to work fine, but the installed binary fails (when running make install ). It seems to be failing on this step: ... generating help tags /usr/local/bin/vim -u NONE -esX -c "helptags ++t ." -c quit dyld: Symbol not found: _environ Referenced from: /Users/neezer/.rvm/rubies/ruby-1.9.2-p0/lib/libruby.1.9.1.dylib Expected in: flat namespace in /Users/neezer/.rvm/rubies/ruby-1.9.2-p0/lib/libruby.1.9.1.dylib make[2]: *** [vimtags] Trace/BPT trap make[1]: [installrtbase] Error 2 (ignored) I used this to configure: ./configure --prefix=/usr/local -

Cannot compile mergevec.cpp from Haartraining tutorial

a 夏天 提交于 2019-12-05 10:36:26
I have been following this tutorial ( http://note.sonots.com/SciSoftware/haartraining.html ) to do some Haar training. I am currently stuck on creating the training samples, specifically the combining of the .vec files. I am provided with this ( http://note.sonots.com/SciSoftware/haartraining/mergevec.cpp.html ) file and a description of how to build it for Linux (Ubuntu 11.04). Here lies my problem, I am unable to build the mergevec code. The only error is "fatal error: cvhaartraining.h: No such file or directory." I have checked to make sure that cvhaartraining.h is in the same directory as