libxml uses the following line of code in libxml.h but it doesn't come bundled with libxml.
#include "config.h"
I'm trying to use XMPPFramework for Objective-C, in Swift. The XMPPFramework has libxml as a dependency.
You could try including these:
#include <stdio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
As found on:
http://wiki.xmlsoft.org/The_libxml2_Library#Installing
Related
I downloaded LLVM (12.0.1) from the script file llvm.sh which they have now started to include on their Debian downloads page.
Ran clang and everything was working as expected(good job dev team I guess?).
The installation script installed LLVM in /usr/lib/LLVM-12/ and /usr/include/LLVM-12/ (these had some .h files)
So I tried writing some passes; created an out-of-tree build using the answer given here:
Facing issue with makefile for Hello pass in llvm
But when I ran the make, it gave me this error:
/usr/include/llvm-12/llvm/Pass.h:337:10: fatal error: llvm/PassAnalysisSupport.h: No file or directory
337 | #include "llvm/PassAnalysisSupport.h"
|
compilation terminated.
So I checked /usr/include/llvm-12/llvm/ and found that Pass.h and PassAnalysisSupport.h both were present in the current directory, so shouldn't the Pass.h file have #include "PassAnalysisSupport.h" instead of the present #include "llvm/PassAnalysisSupport.h"?
I also checked the code for Pass.h online and it also had #include "llvm/PassAnalysisSupport.h". Other header files in the llvm directory also used the same format #include "llvm/<name>"
So what is going on here, who messed up, the devs or my llvm.sh (also the devs) or the problem is something else?
Any help would be appreciated (Im using Mint MATE 20.2 if thats relevant)
Source file (headers; firstpass/first/fpass.cpp):
#include <llvm-12/llvm/Pass.h>
#include <llvm-12/llvm/IR/Function.h>
#include <llvm-12/llvm/Support/raw_ostream.h>
#include <llvm-12/llvm/IR/LegacyPassManager.h>
#include <llvm-12/llvm/Transforms/IPO/PassManagerBuilder.h>
(firstpass/CMakeLists.txt):
find_package(LLVM REQUIRED CONFIG)
include_directories($(LLVM_INCLUDE_DIRS))
add_subdirectory(first)
(firstpass/first/CMakeLists.txt):
add_library(LLVMfirst MODULE fpass.cpp)
I am trying to compile a simple CLR project, which has no dependency.
When I compile this project I get 973 warnings (C4945) stating that
c:\windows\microsoft.net\framework\v4.0.30319\system.dll : warning C4945: 'xxx' : cannot import symbol from 'c:\windows\microsoft.net\framework\v4.0.30319\system.dll': as 'xxx' has already been imported from another assembly 'System'
As I mentioned that my project has no dependency on other projects, I tried to compile my cpp files one by one, starting with stdafx.cpp.
While doing this I noticed that if I include #include <msclr\marshal.h> I get those warnings, and if I don't there are no warnings.
Now I have following queries.
Is #include <msclr\marshal.h> deprecated and replaced by something
else?
If no, how can I remove those warnings? Is #pragma warning disable the only way?
This is still a problem for VS2019, but you can force the header to skip #using <System.dll> like this:
#pragma push_macro("_CRT_WINDOWS")
#define _CRT_WINDOWS
#include <msclr\marshal.h>
#pragma pop_macro("_CRT_WINDOWS")
This works for the other marshal headers as well (marshal_cppstd.h, etc.)
I am trying to compile some scripts from exploit-db by using GCC (Linux Debian), and when I issue the gcc command to compile the code (gcc -o test test.c) I'm getting a message that says that the files "linux/linkage.h" and "asm/page.h" could not be found.
When I issued a command $ locate linkage.h, I found that these files are in /usr/src/linux-headers-4.3.0-kali1-common/include/linux/linkage.h and /usr/src/linux-headers-4.3.0-kali1-common/include/asm/page.h respectively.
Is there any way to tell GCC to consider this path or maybe change the standard path?
Below you can find a few lines of the code that I am trying to compile.
/*
* Linux kernel 2.4 uselib() privilege elevation exploit.
*
* original exploit source from http://isec.pl
* reference: http://isec.pl/vulnerabilities/isec-0021-uselib.txt
*
* I modified the Paul Starzetz's exploit, made it more possible
* to race successfully. The exploit still works only on 2.4 series.
* It should be also works on 2.4 SMP, but not easy.
*
* thx newbug.
*
* Tim Hsu <timhsu at chroot.org> Jan 2005.
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sched.h>
#include <syscall.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/sysinfo.h>
#include <linux/elf.h>
#include <linux/linkage.h>
#include <asm/page.h>
#include <asm/ldt.h>
#include <asm/segment.h>
#define str(s) #s
#define xstr(s) str(s)
Use the include flag,
gcc -I"/usr/src/linux-headers-4.3.0-kali1-common/include/" -o test test.c
I want to change the default blue color of my Sencha Touch application to green. The steps I followed are listed below:
gem update --system
gem install compass
compass create myfile
Copied a .scss file and pasted it in the touch-2.2.1/resources/sqss/ directory.
Pasted the following code in that file and named it happy.css:
$base-color: #709e3f;
#import 'sencha-touch/default/all';
#include sencha-panel;
#include sencha-buttons;
#include sencha-sheet;
#include sencha-tabs;
#include sencha-toolbar;
#include sencha-list;
#include sencha-layout;
#include sencha-loading-spinner;
compass compile happy.scss
Replaced the name happy.scss in the app.html page.
Ran the application, and I got the following error:
Syntax error: Undefined variable: "$font-family".\a on line 2 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_Class.scss\a
from line 1 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_all.scss\a
from line 1 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/_all.scss\a
from line 3 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss\a\a
1:
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss
How can I solve this?
Add the following line
#import 'sencha-touch/default';
Before this line
#import 'sencha-touch/default/all';
Also as per documentation
There are a lot of changes from Sencha Touch 2.1 to 2.2,
The most important change to be aware of is the move away from using mixins
for each component
We found that using mixins for each component was quite slow when compiling your Sass,
so we decided to simply move to using #import to just include each component.
In Touch 2.1, your stylesheet looked like this:
#import 'sencha-touch/default/all';
#include sencha-panel;
#include sencha-buttons;
// and other components…
In Touch 2.2, it looks like this:
#import 'sencha-touch/default';
#import 'sencha-touch/default/Panel';
#import 'sencha-touch/default/Button';
// and other components
I am trying to include 2 platform-specific stdafx.h files in my .cpp file, but the compiler is unhappy when I try to #ifdef it.
#ifdef _WIN32
#include "stdafx.h"
#elif _MAC
#include "MAC/stdafx.h"
#endif
You may wonder why I am using stdafx.h in the Mac code, but that is not important at the moment :).
When I try to compile the code on Windows, I receive: Fatal Error C1018. I tried enclosing other header files with #ifdef in the same file, and the compiler was happy. Therefore, it looks like Windows doesn't like stdafx.h to be #ifdef-ed, or that Windows only allows #include stdafx.h
to be the first line in the file.
So my question is, why?
Kat
When the compiler includes a pre-compiled header, it basically "forgets" anything that came before the header. Thus your #elif isn't matched to a #if anymore.
This is because you have Precompiled Headers turned on - turn it off and you should be fine.