compilation

error while compiling opencv for QT

假如想象 提交于 2019-12-06 09:03:30
i want to use opencv in QT , so i must compile it with mingw . When i want to compile it with CMake 2.8.10.2 it has following error The CXX compiler identification is GNU 4.7.2 The C compiler identification is GNU 4.7.2 Check for working CXX compiler: C:/Qt/Qt5.0.1/Tools/MinGW/bin/g++.exe Check for working CXX compiler: C:/Qt/Qt5.0.1/Tools/MinGW/bin/g++.exe -- broken CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "C:/Qt/Qt5.0.1/Tools/MinGW/bin/g++.exe" is not able to compile a simple test program. It fails with

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

自古美人都是妖i 提交于 2019-12-06 08:43:11
问题 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

How to compile Cocos2d-X with Marmalade?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 08:42:50
问题 Does any body know a tutorial, or a three simple step in order to compile the code the I wrote with Cocos2d-x with Marmalade? I want to take the code I already compiled and used in Cocos2d-X, insert into a marmalade project, and compile. In lots of places is written as easy, but I have difficult with this. I'll really appreciate if someone has some easy step to follow: "Maramalade + cocos2d-x for dummies style :) " Thanks, Adrian. 回答1: I think this post on Marmalade forum may help you. 回答2:

gcc: confused about -static -shared -fPIE -fPIC -Wl,-pie

五迷三道 提交于 2019-12-06 08:15:16
I'm trying to build clang, with all library static linked in. So that I can run it on CentOS 6 with ancient GCC 4.4 version. At first, I think adding the option -static by turning on LLVM_BUILD_STATIC is enough. But in the link stage, it errors out. dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie So, I add -fPIE -Wl,-pie to CMAKE_CXX_FLAGS, and it says -- Performing Test HAVE_CXX_ATOMICS_WITH_LIB -- Performing Test HAVE_CXX_ATOMICS_WITH_LIB - Failed CMake

Compile error while compiling libyaml under windows 7

邮差的信 提交于 2019-12-06 08:12:37
问题 I am trying to compile libyaml under Windows 7 with MingW. I have tried to compile 0.1.2 and 0.1.3 but I get this error: api.c:579: error: failure in redeclaration of 'yaml_token_delete': dllimport'd symbol lacks external linkage. api.c:579: confused by earlier errors, bailing out Have anyone else seen this error? Do you guys and gals know how to fix it? 回答1: There is a patch floating around the ruby installer community that I'm hoping points to a fix here. I had to manually patch the yaml-0

How to compile C in both Linux and Solaris?

丶灬走出姿态 提交于 2019-12-06 08:10:40
I want to make a Makefile to can compile both in Linux and in Solaris. I know how to do so individually, but how can I combine both and be able to detect what kind of OS I am using? I am trying to do this for just a simple C file - but it is the name of the compiler that changes. GNU Autoconf was designed to solve this very problem: Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a

CompileAssemblyFromDom throws access denied exception

不问归期 提交于 2019-12-06 08:02:33
问题 The code: using (var codeProvider = new CSharpCodeProvider()) { var compilerParameter = new CompilerParameters( _assemblies, assemblyName, false) { GenerateInMemory = true, CompilerOptions = "/optimize" }; var compilerResults = codeProvider.CompileAssemblyFromDom( compilerParameter, templateResults.Select(r => r.GeneratedCode) .ToArray()); } It throws exception: CS1567 Error generating Win32 resource: Access is denied. What does it mean? 回答1: I get this working. The problem was that

Cmake compiling python into build folder

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 07:53:45
问题 I think an example would be the best way to demonstrate my problem: Lets say I have a source directory named src. This directory has two files, a CMakeLists.txt file and a python file named blah. In the same place where src is stored, there is a folder named build. Now, I would like to be able to run cmake and make it compile my python file blah and place it into my build directory. Currently, my CMakeLists.txt is just copying the uncompiled code straight into my build directory using the

Best choice? Edit bytecode (asm) or edit java file before compiling

ⅰ亾dé卋堺 提交于 2019-12-06 07:40:14
Goal Detecting where comparisons between and copies of variables are made Inject code near the line where the operation has happened The purpose of the code: everytime the class is ran make a counter increase General purpose: count the amount of comparisons and copies made after execution with certain parameters 2 options Note: I always have a .java file to begin with 1) Edit java file Find comparisons with regex and inject pieces of code near the line And then compile the class (My application uses JavaCompiler) 2)Use ASM Bytecode engineering Also detecting where the events i want to track

Field not found exception with compiled dll regular expression

南楼画角 提交于 2019-12-06 07:25:54
I'm having trouble with this error and been searched for a solution on google but there aren't any. Exception: Field not found: 'System.Text.RegularExpressions.Regex.internalMatchTimeout'. My regular expression is : TheExpressions.Add("ExtractURL", @"\b(?:(?:https?|ftp|file)://|www\.|ftp\.) (?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])* (?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])"); Code to compile with options: CI[Cnt++] = new RegexCompilationInfo((string)de.Value, // the reg. ex pattern RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline