compilation

Are there any XSLT to C++ compilers available?

走远了吗. 提交于 2019-12-04 12:24:54
I found only one attempt to create such compiler - http://sourceforge.net/projects/xsltc/ . But this project is dead for decade already. Are there any other examples? Opensource or commercial? Are there any fundamental technical difficulties with building such software? With the whole approach of compiling XSLT natively? I suppose there are good use cases for using it - places where we don't need to change XSLT but still would like to get higher performance (and probably, lower memory requirements). Are there any other reasons this software may be not so efficient as it looks? - Are

When and why would I use -fno-elide-constructors?

强颜欢笑 提交于 2019-12-04 12:13:16
I'm learning C++ and I came across the -fno-elide-constructors , below I have included the description from the man page. -fno-elide-constructors The C++ standard allows an implementation to omit creating a temporary which is only used to initialize another object of the same type. Specifying this option disables that optimization, and forces G++ to call the copy constructor in all cases. So with this option I am able disable this particular type of compiler optimization. I have a program that creates 2 objects and adds them together and prints when each of the function is called using using

Retrieve plain text script from compiled bash script

怎甘沉沦 提交于 2019-12-04 12:11:03
问题 Some time ago, i wrote some bash scripts for my school. I thought it would be very clever to 'protect' them, so i compiled them with shc into a binary file. Some weeks later, i lost the uncompiled scripts and now i have only my binarys left. Is there a way to retrieve the scripts back from the shc generated binarys? I looked into the source code of shc to find a way to decompile the binarys with no luck. 回答1: Using shc to compile your scripts does not protect them. You don't get more security

Relative or independent paths in libtool .la file

为君一笑 提交于 2019-12-04 12:06:20
问题 My .la file has full pathnames in both the dependency_libs= section and the libdir= section which makes it difficult to copy my libraries to a different machine (same arch but different path structure). What is the solution to this, besides having some script to hack the .la file to adjust for the paths on the new machine? ==Details== When I ./configure; make; make install my libfoo , depending on how I use the --prefix , --exec-prefix , and DESTDIR= flags, I'll get an entry in the libfoo.la

Why don't C++ compilers optimize away reads and writes to struct data members as opposed to distinct local variables?

不问归期 提交于 2019-12-04 11:25:15
问题 I'm trying to create a local array of some POD values (e.g. double ) with fixed max_size that is known at compile time, then read a runtime size value ( size <= max_size ) and process first size elements from that array. The question is, why doesn't compiler eliminate stack reads and writes when arr and size are placed into the same struct / class , as opposed to the case where arr and size are independent local variables? Here's my code: #include <cstddef> constexpr std::size_t max_size = 64

Compiling libpq with iOS SDK 4.2

梦想与她 提交于 2019-12-04 11:19:20
I'm trying to compile again the libpq for arm and i386 with the iOS SDK 4.2. I did last year for SDK3.x without any problems. Now, when I want to create the fat binary file with two files, I'm getting this error: specifed architecture type (arm) for file (/Users/montx/mylibs_sdk42/libpq.arm) does not match its cputype (7) and cpusubtype (3) (should be cputype (12) and cpusubtype (0)) I'm compiling again because my compiled files doesn't work with the latest iOS4.2 Detected an attempt to call a symbol in system libraries that is not present on the iPhone: fcntl$UNIX2003 called from function pg

Undefined reference gcc

时光毁灭记忆、已成空白 提交于 2019-12-04 11:06:46
When I try to compile my program on ubuntu using gcc, i get these errors: main.c:(.text+0x162): undefined reference to json_parse' main.c:(.text+0x182): undefined reference to json_value_free' However, these functions are included in a file called json.h, which I import in main.c and which I include in my gcc command. Anyone got a clue? You should not compile the "json.h" header. The undefined reference is not a compiler error, it's a linker error . It means you have either not compiled the file containing json_value_free to your code, or haven't linked to the library containing it. You should

How to compile dll loadable in tcl

a 夏天 提交于 2019-12-04 10:56:07
After trying many and searching web option to compile and load dll I could not able to create dll for tcl. Can you explain me how to do this. Ok, here is a simple example. This code compiles and works for Tcl8.5 and VS2008. To start with I created a WIN32 dll project called BasicTclExtn that exported symbols. // BasicTclExtn.h #ifdef BASICTCLEXTN_EXPORTS #define BASICTCLEXTN_API __declspec(dllexport) #else #define BASICTCLEXTN_API __declspec(dllimport) #endif int BasicExtnCmd(ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) ; extern "C" { BASICTCLEXTN_API int Basictclextn

Why does compiling this code cause a compiler stack overflow?

£可爱£侵袭症+ 提交于 2019-12-04 10:54:43
问题 interface Pong<T> {} class Ping<T> implements Pong<Pong<? super Ping<Ping<T>>>> { static void Ping() { Pong<? super Ping<Long>> Ping = new Ping<Long>(); } } Trying to compile this gives the error: The system is out of resources. Consult the following stack trace for details. java.lang.StackOverflowError at com.sun.tools.javac.code.Types$23.visitClassType(Types.java:2579) at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:554) at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types

Automate Delphi 2010 project build with MSBuild

白昼怎懂夜的黑 提交于 2019-12-04 10:31:17
问题 I'm looking to compile my Delphi 2010 project using MSBuild, but something isn't right, I just couldn't make MSBuild to compile my project. I tried this command line: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\MyProject\Myapp.dproj" /t:Release and this: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\MyProject\Myapp.dproj" /p:Configuration=Release /t:Release But MSBuild won't recognize my build configuration! I also changed [ rsvars.bat ] but it didn't