compilation

Cannot `import static` static inner class?

夙愿已清 提交于 2019-12-05 05:47:37
I have a class A with a static inner class inside it called B : import static A.B.*; class A { static class B { static int x; static int y; } public static void main(String[] args) { System.out.println(x); } } I want to static import everything in B , but it wont work: $ javac A.java A.java:1: package A does not exist import static A.B.*; ^ A.java:9: cannot find symbol symbol : variable x location: class A System.out.println(x); ^ 2 errors Why? Reimeus This won't work if A is in the default package. However, you could add a package declaration: package mypackage; and use import static

Compiling C++11 on g++ 4.4.7 in Red Hat linux [closed]

风格不统一 提交于 2019-12-05 05:20:03
I have already tried: g++ -std=c++11 my_file.cpp -o my_prog g++ -std=c++0x ... g++ -std=gnu++0x ... and I keep getting this message: error: unrecognized command line option C++0x/C++11 Support in GCC From there you can see that C++11 is supported since gcc 4.7 and gcc 4.4 has C++0x support. Quote from Status of Experimental C++0x Support in GCC 4.4 : GCC provides experimental support for the upcoming ISO C++ standard, C++0x. This support can be enabled with the -std=c++0x or -std=gnu++0x compiler options; the former disables GNU extensions. So it should work with -std=c++0x or -std=gnu++0x .

No such module “Armchair”

帅比萌擦擦* 提交于 2019-12-05 04:53:13
This problem is driving me insane. Whatever I do, I get the problem "No such module 'Armchair'" when I archive. It works when I build but when I archive XCode messes with me. I see XCode archiving/compiling Armchair. I have added $(PROJECT_DIR)/AppName/External/Armchair/build/Release-iphoneos to Framework Search Paths . I have added the framework in Embedded binaries I have added the framework in Linked Frameworks and Libraries I have also tried with adding the framework to copy frameworks in my Build Phases I have tried by adding the Armchair framework to my workspace instead and only added &

Error while loading shared libraries: /usr/local/lib64/libssl.so.1.1

别说谁变了你拦得住时间么 提交于 2019-12-05 04:51:25
I’m trying to compile openssl-1.1.0e on Centos 7 (7.3.1611) but after i successfully compiled everything without any warning, i get an error when i’m trying any openssl command [mdm@dev openssl-1.1.0e]$ openssl version openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory Is it a bug or my mistake? Here below some info about my system/configuration Configure: [mdm@dev openssl-1.1.0e]$ ./Configure linux-x86_64 --prefix=/usr/local --openssldir=/usr/local Make/Make test: ... All tests successful. Files=91, Tests=486, 44 wallclock

Angular $compile template for dynamic email

眉间皱痕 提交于 2019-12-05 04:30:24
I am trying to load a html template with ng-repeats in it and then use the $compile service to compile it and use the compiled html in an email. The problem.... Ok before asking let me set terminology... binding placeholder: {{customer.name}} binding value: 'john doe' Using $interpolate i get the actual binding values but does not work with ng-repeats. Example: var html = $interpolate('<p>{{customer.name}}</p>')($scope) Returns: '<p>john doe</p>' Ng-repeats do not work Using $compile i get the bindings placeholders ie {{customer.name}} but what I need is the binding value 'john doe' . Example:

How can I compile ndpiReader.c that comes with nDPI library in Windows?

雨燕双飞 提交于 2019-12-05 03:28:54
I want to create a .exe of ndpiReader.c demo program that comes with nDPI library . I was successful to compile it on Ubuntu using commands specified on their github page as bellow: ./autogen.sh ./configure make I have tried to cross compile it using GCC inside Ubuntu but I wasn't successful. I also tried to use the pcapExample.sln to compile it in Visual Studio 2012, but I keep getting error messages like: Error 29 error C1083: Cannot open include file: 'ndpi_api.h': No such file or directory Although ndpi_api.h and all other files that I get this error for already are listed in the project

ASP.net MVC project not compiling on IIS

南笙酒味 提交于 2019-12-05 03:00:12
问题 I used to just upload asp.net websites to the live server, and IIS compiles them automatically. But when I do the same with asp.net MVC projects I just get errors, and I need to release Build the project before I upload it. Note1: I'm using VWD 2008 Express Note2: The project is working perfectly if I release build it on my machine then upload to the server 回答1: Charles Boyung's comment should have been considered as an answer. MVC applications are like Web Projects, not Web Sites in Visual

Writing unit tests in my compiler (which generates IL)

Deadly 提交于 2019-12-05 02:51:36
I'm writing a Tiger compiler in C# and I'm going to translate the Tiger code into IL . While implementing the semantic check of every node in my AST, I created lots of unit tests for this. That is pretty simple, because my CheckSemantic method looks like this: public override void CheckSemantics(Scope scope, IList<Error> errors) { ... } so, if I want to write some unit test for the semantic check of some node, all I have to do is build an AST, and call that method. Then I can do something like: Assert.That(errors.Count == 0); or Assert.That(errors.Count == 1); Assert.That(errors[0] is

When do C and C++-compilers convert or promote a float to double, implicitly?

喜夏-厌秋 提交于 2019-12-05 02:48:29
问题 For an embedded project I'd like to know when does a standard-compliant C-compiler (C99) and C++-compiler (C++11) will most likely implicitly promote a single-float variable/value to double-float. I'm aware of two cases: literals which are not suffixed with f . For example: 3.14 passing a float to function with variadic argument-list ( ... ) Are there any others? What about templates? The answers of this question are very helpful for me as well - including it here for reference. 回答1: In C: A

When to use the XCode Distributed Build Feature

99封情书 提交于 2019-12-05 02:48:19
I work in a small iPhone development team, in our office, we have at least 4 copies of XCode running on the network at any one time. Contemplating getting everyone to have it running. We're networked together using a standard WIFI Switch, so network speed and latency isn't as good as wired network... Just wondering, is there any real time gain to be had on using distributed builds? Once it passes the relevant data back and forth over the network. At least for relatively small projects. it depends on your project, its dependencies, and the amount of data that must be transferred. 15-20 seconds