w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
cross compilation application qt from Windows to ubuntu
You cannot cross-compile to "Linux", because that's not an OS. Certain system-level libraries and interfaces differ from distribution to distribution, making it nearly impossible to get a one-binary-covers-all. Setting up a cross-compiler is generally a pain in the... nuts, and for Linux->Windows, there is no free alternative (a Windows license isn't free). For Windows->Linux, you can install the distribution you are targetting and compile it natively (perhaps in a virtual machine). This guarantees compatibility with the OS you're targetting and is much more reliable than cross-compiling.

Categories : Qt

Conditional compilation for app name
Resolved by creating a small program fired as a Pre-Build event which read the Manifest and change it accordingly to the Config name passed to him For reference of anyone should have this problem here is the code. This implementation takes two parameter par1: name of the config par2: path to the WMAppManifest of the application static void Main(string[] args) { XmlDocument document = GetDocument(args[1]); SubstituteName(document, args[0]); SaveDocument(document, args[1]); } private static void SaveDocument(XmlDocument document, string path) { document.Save(path); } private static void SubstituteName(XmlDocument document, string ConfigName) { string name="appname "+ConfigName; if (ConfigName.Equals("Config1"

Categories : C#

How to get compilation day from C++ defines?
There is a standard predefined macro: __DATE__ It expands to a string constant containing the date the preprocessor was run. The string always contains 11 characters in this format "Jul 28 2013". Code which determines the day of the week from the date can be found here.

Categories : C++

What vim features available only upon compilation?
Vim can be compiled as a small executable with only the bare minimum features needed for quick edits, that's the default vim you get on most unixes, or as a big executable with many more features needed for programing. The compile-time features required by commands and functions are listed in the doc under each command/function with specific requirements. No feature needed means the command is available no matter what features were enabled at compile time. You can read about the subject in :help :version

Categories : Vim

C - compilation error
Everything is from compiled highest source file - main.o strange thing to compile an object-file again, or to name a source-file like an object-file. .o normally is what comes from the compilation step with a .c file.

Categories : C

Compilation error VTK, C++
The readme says that it requires VTK 4.2. Are you sure that you are using exactly this version? Because Ubuntu 12.10 seems to pack version 5.8. Your options are: Find, download VTK 4.2, compile it and use your private copy instead of the system one. Find an updated version of volumemorph that works with your VTK version. Learn the differences between VTK 4.2 and 5.8 and patch the volumemorph yourself!

Categories : C++

Compilation Error C++
Maybe because extendedEuclid isn't defined yet ? You have to add its prototype before calling it. Add pair<LL, pair<LL, LL> > extendedEuclid(LL a, LL b); on the top of your file and it'll work ;)

Categories : C++

ANT compilation fails
It would appear module1 is not compiling because the jar created by module2 is not being built. You're calling the subant task, without specifying target: <subant target="buildJar"> <fileset dir="../module2/" includes="build.xml" /> </subant> The module1 build file does not have a default target specified: <?xml version="1.0" encoding="UTF-8"?> <project name="module2"> .. .. My recommended solution is to specify a default target as follows: <project name="module2" default="buildJar"> Aside Multi-module build support and dependency management are features baked into more modern Java build tools. If you're trying to structure a large project in ANT, consider learning how the ivy plugin works.

Categories : Java

.NET JIT compilation naivety
I'm a bit rusty with this, but I'm also interested in the low level assembly side of things. Here goes: push ebp; save stack frame pointer Push the value stored in EBP onto the stack, so that when we return from this method, we know where we came from. mov ebp,esp; setup current frame Move current stack position value from ESP to EBP, so that EBP is in the context of the current method. The preceding two lines of code are a convention that ensures there's a fixed position (stored in the EBP register) on the stack determining relative location of local variables. call 6F03BE38; Console.Out property getter No prizes for guessing that this is a call to Console.Out mov ecx,eax; setup "this" Returned values from methods are stored in EAX, which is a matter of the calling conventio

Categories : Dotnet

error during gcc 4.7.3 compilation
Can you check that libgmp depends on? If libgmp depends on a library A, then most likely the undefined symbols would be in A. If you have manually compiled libgmp from source, Can you add the configure command in the question?

Categories : Gcc

QML pre-compilation to bytecode, is it possible?
QML pre-compilation to bytecode, is it possible? Unfortunately, this is not possible as of now. Also, this is a fairly large feature request, so will not probably be supported any time soon. For sure, not in the upcoming 5.2 for which we have the feature freeze in one week, but most probably not even 5.3 for next summer, etc. I have just discussed this issue shortly with one of the developers, so you may need to live with(out) it for now. I was also asking about creating a jira report for tracking this, but I have been told such a big feature requests are not tracked there like the v4 engine rewriting for the declarative repository in the near past.

Categories : Qt

Compilation of the access modifiers
After compilation to IL, the information is preserved. A compiled module (DLL) can be referenced by other code and then private/public/protected do matter. After compilation from IL to native machine code, there is no difference. Is there any check during runtime whether one can access the member or not? I'm not totally sure but I would think this is part of the Type-loader. Code that (w/o Reflection) accesses a private variable that it shouldn't know about has to break a rule somewhere.

Categories : C#

Compilation error for set union
s3.begin() needs to be wrapped in std::inserter(s3, s3.begin()). std::inserter constructs an insert iterator which calls insert for you. However, a more efficient way than std::set_union would be: s1.insert(s2.begin(), s2.end()); Unless you didn't want to modify s1 and wanted a separate set.

Categories : C++

Waiting on compilation to finish
compile is async. So, you have two choices. One, don't use compile. Instead use one of the other ways to invoke a shell command, like shell-command or start-process or call-process. I think this is probably preferred; I don't see why you'd need to use compile here. Two, set compilation-finish-function.

Categories : Emacs

Jetty embedded and JSP compilation to 1.7?
http://www.eclipse.org/jetty/documentation/current/configuring-jsp.html#jsp-support When you are configuring the org.apache.jasper.JspServlet, there is an option for compilerTargetVM which lets you set this value. [edit] I'll add that you may want to look into the webdefault.xml file in jetty and poach the JspServlet definition there into your own web.xml and make your changes accordingly. http://www.eclipse.org/jetty/documentation/current/webdefault-xml.html

Categories : Java

Server Side Compilation for .mp4 and .swf
mp4 can be created with ffmpeg from a series of images. Here's a sample from FFMPEG - Stream series of images into MP4 with sound synchronization at specified frame rate Here is an example invocation of ffmpeg that takes frames named sphere00.png through sphere29.png together with one second audio track audio.wav and creates an out.mp4 file that shows the frames at 30 fps together with the sound. ffmpeg -r 30 -f image2 -i "sphere%02d.png" -i audio.wav out.mp4 swf can be created on-demand from Flex source using the mxmlc compiler (which can embed images or be generated dynamically easily). Other swf options include swfmill and haxe

Categories : Actionscript

Int Initialization Error during compilation
You declare int totalRuns, currentRun, upperLimit = 0; but don't initialize totalRuns. So totalRuns += currentRun; doesn't have a value to add to. Initialize it to a default value, for example 0 (same for others) int totalRuns = 0;

Categories : Java

Namespace compilation issues
First, using namespace LLL_NWK is not appropriate here. You are declaring and defining a function void lllInit() outside of namespace LLL_NWK. You need to place the definition inside of the namespace, which can be done like this: void LLL_NWK::lllInit() { } or like this: namespace LLL_NWK { void lllInit() { } } Second, make sure you compile the code as C++.

Categories : C++

Xuggler compilation is failing.
Folks, So finally I was able to successfully build the Xuggler build. It was a compiler version issue. I had installed (by virtue of apt-get install build-essential) latest version of gcc (version 4.7), and it was throwing all the below errors. I downgraded my system to version 4.4, and it worked. I could have chosen 4.6 or something else, but now I guess its not required. /anil.

Categories : Misc

Conditional Compilation #ifdef
The # directives are compile time and not run time. So it doesn't matter what you pass. If the macro PKT is defined then "Packet" is printed, else not. If you are running gcc you can do gcc -E myfile.c and check the result after preprocessing. If you remove the bunch of preprocessor directives from your getval function, then the "Packet" will not be printed, because in that case PKT is not defined, and therefore the #ifdef PKT is false and the printf does not reach the compiler.

Categories : C

GHC: insert compilation date
Using Template Haskell for this is relatively simple. You just need to: Run IO action within Template Haskell monad: runIO :: IO a -> Exp a Then create a string literal with: stringE :: String -> ExpQ Put a whole expression within a quasiquote. $( ... ) This program will print time of its compilation: {-# LANGUAGE TemplateHaskell #-} import Language.Haskell.TH import Data.Time main = print $(stringE =<< runIO (show `fmap` Data.Time.getCurrentTime)) You may put the relevant fragment into a module that imports all other modules to make sure it is recompiled. Or take current revision information from your versioning system. See: TemplateHaskell and IO

Categories : Haskell

java: I cannot run the program after compilation? Help me
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available during compile time. For example if we have a method call from a class or accessing any static member of a Class and that class is not available during run-time then JVM will throw NoClassDefFoundError. Obvious reason of NoClassDefFoundError is that a particular class is not available in Classpath, so we need to add that into Classpath or we need to check why it’s not available in Classpath if we are expecting it to be. There could be multiple reasons like: Class is not available in Java Classpath. You might be running your program using jar command and class was not defined in manifest file's ClassPath attribute. Any start-up script is overrid

Categories : Java

Freebasic Compilation Fail
In your program the variable var1 is declared in the main program scope. This variable will not be accessible in sub programs (procedures: SUB or FUNCTION), unless you use the SHARED keyword. Then the variable would become globally available in your program. The better way is to use local variables: declare sub premain declare sub main premain sleep: end sub premain print "EMC ALPHA v1.0" main end sub sub main print "Functions:" print "1.Add" print "2.Subtract" print "3.Multiply" print "4.Divide" '****vv HAVE A LOOK HERE vv**** dim var1 as integer input "Enter Function Number" ;var1 if var1=1 then print "HElo" end if '<== this was missing, too. ***** ("Expected END IF") end sub Global variables (created by SHARED) should only rarely b

Categories : Misc

C++ Makefile compilation order
The order of initialization of globals in different source files is unspecified. As such it can depend on anything, including for example the order that the files are compiled. In this case, if CCLayoutParamsWrapWrap is initialized before CCSizePolicyWrapContent, then its constructor will not see the value -1 set by the constructor of CCSizePolicyWrapContent. It will instead see the value 0 set by so-called "static initialization", which happens before "dynamic initialization" (that is, constructor calls). I don't know specifically what about gcc is causing the difference, but I suspect it's the link order rather than the compile order that really matters. That's just a guess, though, if you care to confirm or refute it you can test. The important point is that you shouldn't rely on it,

Categories : C++

MySQL C++ compilation fail
You are not (yet) trying/failing to link boost, you're trying and failing to include one of its header files. You need to include a -I option on the compilation line telling the compiler where to find the header(s) that it cannot locate. If you don't have the boost package installed, you will need to take care of that first.

Categories : C++

Raphael.d.ts compilation issues
Update: You can get the latest file here which my pull request merged https://github.com/borisyankov/DefinitelyTyped/blob/master/raphael/raphael.d.ts It should have been : getColor:{ (value?: number): string; reset(); }; instead of getColor { (value?: number): string; reset(); };

Categories : Typescript

Simple gcc compilation on cygwin 64-bit
On 23/07/2013 13:40, Richard H Lee wrote: On 23/07/2013 13:35, JonY wrote: Try rerunning setup again, there was a mistake in the w32api-runtime -1 release. -2 should have this fixed. Yeah, I just installed xxd 5 mins ago and I saw w32api-runtime flash up on the download bar. I figured that was the package and gave gcc another shot. It compiles fine now.

Categories : Gcc

Compilation error with _kCTSuperscriptAttributeName
It looks like you haven't linked the CoreText framework. You can do it in the Build Phases section of your target settings, as explained here: How to "add existing frameworks" in Xcode 4?

Categories : Iphone

Javac Cross-Compilation with 1.7
You cannot have a newer version of source and lower version of target. For example, In Java 5, a number of new features were added to the language, such as generics, autoboxing and you cannot expect a JVM 1.4 to understand it. So, you must tell the compiler that your source code is Java 1.4 source code. This explains the results you have. The default for -target depends on the value of -source: If -source is not specified, the value of -target is 1.7 If -source is 1.2, the value of -target is 1.4 If -source is 1.3, the value of -target is 1.4 If -source is 1.5, the value of -target is 1.7 If -source is 1.6, the value of -target is 1.7 For all other values of -source, the value of -target is the value of -source. For more info refer to http://docs.oracle.com/javase/7/docs/technotes/too

Categories : Java

Why does compilation through MSBuild take so much longer than through the IDE?
I guess there are some packages for which the IDE somehow can find the compiled dcu's in the path and MSBuild can only find the source. Doesn't MSBuild output a compilation log that you can examine or post here?

Categories : Delphi

Android kernel compilation
.config file is auto generated file, changing any flags in .config will not affect the kernel configuration. To change the kernel configuration you need to open configuration window by typing below command in your kernel folder: make ARCH=arm menuconfig PS:: if you are using ubuntu 12.04 you may get some error while executing the 'make ARCH=arm menuconfig' command, to get rid of it try (atleast it worked for me): sudo apt-get install lib32ncurses5-dev

Categories : Android

Strange Compilation Behavior
Multiplication and division are left-associative. So if you remove the parentheses you are computing (-1 * session.max_y) / 2 instead of -1 * (session.max_y / 2). If that max_y field is unsigned, then that division is going to do a sign extension in one case where it wouldn't in the other, and thus produce a different result.

Categories : C

Qt compilation error with mingw32
I think your project file is wrong. So you want a GUI application, but you remove the GUI module by QT -= gui Have you tried creating this application with the project start wizard? I think you may have selected the wrong type of application. EDIT If you want to build a project without the gui module, you need to exclude it with the "-=" operator. By default, QT contains both core and gui, so the following line will result in a minimal Qt project being built: QT -= gui # Only the core module is used. So, you only have the core module. Source: http://qt-project.org/doc/qt-4.8/qmake-project-files.html Try deleting the QT -= gui line, since "Note that QT includes the core and gui modules by default". See source.

Categories : C++

C++11 compilation error while using lambda over map
You want std::min_element instead of std::min.

Categories : C++

gstreamermm and Qt compilation error
The error appears because Qt defines foreach macro as a shorthand for Q_FOREACH. This conflicts with declaration of foreach method in a few gstreamermm classes. There are a few possible ways to avoid the problem: Add CONFIG += no_keywords line to your Qt project file. Note that then you won't be able to use Qt-specific keywords like e.g. signals and slots. If you use them already (e.g. because they were auto-generated by QtCreator), you can replace them with Q_SIGNALS and Q_SLOTS macros. Change the order of header inclusion by putting gstreamermm.h before Qt headers. Put #undef foreach after including Qt headers but before including gstreamermm.h. 2 and 3 are much less elegant solutions, since the order of header inclusion shouldn't matter in a well-written application which uses well

Categories : C++

DisplayFor() compilation error
The problem is in List.cshtml. You need to change it to soemthing like bellow: @using PartyBiz.Models.Objects @model IEnumerable @foreach(var m in Model) { @Html.DisplayFor( m => m.Organizations ) }

Categories : C#

QTMultimedia compilation for Raspberry Pi
If QtMultimedia is not being built, how can you expect it to work running the application? That probably means you're still missing some dependencies or something else is wrong with your env. Maybe you didn't set pkgconfig paths correctly. You can also try with this guide I wrote: http://thebugfreeblog.blogspot.it/2013/03/bring-up-qt-501-on-raspberry-pi-with.html. I had issues with audio and gstreamer, but some time has passed and something might have changed since then. If after building and deploying the QtMultimedia module and the gstreamer plugin you still get that, use the QT_DEBUG_PLUGIN env variable to get some logs.

Categories : Qt

C typedef enum compilation
An enum declaration creates an enumerated type. Such a type is compatible with (and therefore has the same size and representation as) some predefined integer type, but the compiler chooses which one. But the enumeration constants are always of type int. (This differs from C++, where the constants are of the enumerated type.) So typedef unsigned char ... vs. typedef enum ... will likely change the size and representation of the type, which can matter if you define objects of the type or functions that return the type, but the constants VALUE_1 et al will be of type int either way. It's probably best to use the enum type; that way the compiler can decide what representation is best. Your alternative of specifying unsigned char will minimize storage, but depending on the platform it migh

Categories : C

Cross compilation : jdk1.6 on jdk 1.7
That might not be enough. First of all, besides setting target to 1.6, you should also set source to 1.6: <javac source="1.6" target="1.6" srcdir="src"> to let the Java compiler know that it should interpret your code as 1.6-compatible source code. But a bigger problem is that this does not prevent you from using classes, interfaces and methods which are new in the Java 7 standard library. If you use Java 7-only classes, interfaces or methods, it will compile, but you'll get errors like NoSuchMethodError when you run it on Java 6 and you're calling a method that didn't exist in Java 6. The safest way to ensure that your code is compatible with Java 6 is installing JDK 6 and using that to compile your code. (Note: There's no problem with having multiple versions of the JDK insta

Categories : Java

How to resolve this compilation error
You can define _CRT_SECURE_NO_WARNINGS in the header file that generates the error, before including the header file or apply it to the entire project by adding it to the project settings in "Project->Properties->Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions". #define _CRT_SECURE_NO_WARNINGS #include "initshader.h" //... your code here If you are using pre-compiled headers and the header generating the errors is included in stdafx.h you will need to add it to the stdafx.h header or add in your project settings as described above.

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.