Comments (6)
You should add the iso646.h
file or add the /FIiso646.h
flag.
See also: https://github.com/lief-project/LIEF/blob/master/examples/cpp/CMakeLists.txt#L51
from lief.
(For clarification: I used the release version 0.6.0.)
main.cpp itself gets compiled into an .obj file just fine now, but it won't compile into a PE:
These occured once:
libcpmt.lib(xwctomb.obj) : error LNK2005: _Getcvt is already defined in msvcprtd.lib(MSVCP140D.dll)
LIEF-Test.exe : fatal error LNK1169: At least one symbol defined multiple times
These occured many times in many object files included in LIEF.lib:
LIEF.lib(Binary.cpp.obj) : error LNK2038: Conflict determined for "_ITERATOR_DEBUG_LEVEL": The value "0" is not equal to "2" in main.obj.
LIEF.lib(Binary.cpp.obj) : error LNK2038: Conflict determined for "RuntimeLibrary": The value "MT_StaticRelease" is not equal to "MDd_DynamicDebug" in main.obj.
from lief.
You should try to compile your main.cpp
in release mode and not debug mode.
You can look at these flags:
https://github.com/lief-project/LIEF/blob/master/examples/cpp/CMakeLists.txt#L50
BTW: pe_reader.cpp
compiles (and run) successfully on Windows: https://ci.appveyor.com/project/Romain/lief/build/0.4.3/job/ro4udt7qd5ixsg0h#L1811
from lief.
@JaceCearK1 I documented the configuration to use the Windows SDK: 67d759e
from lief.
Ah, switching the /MD-flag to /MT was the last step to fixing it!
Thank you very much! :)
Something OffTopic that now occured to me is that s5.png is not being loaded in installation.rst
I can't seem to find a typo though; maybe Git's at fault here! Try renaming it back to _static/windows_sdk/s6.png and look whether it fixes the issue.
from lief.
Now the documentation is available here: https://lief.quarkslab.com/doc/installation.html#windows-sdk
from lief.
Related Issues (20)
- Adding same sections to same PE produces different builds HOT 2
- use lief.ELF.parse( ) parse 32bit-ARM ELF samples: Can't parse section #00 The .shstr index is out of range of the section table Segment #4 has a physical size larger than the current stream size (27700 > 8884). The content will be truncated with the stream size. Segment #4 has a corrupted file offset (0x3000)
- Failure to build from source using Python instructions HOT 2
- binary->name in machd_reader. c has not been initialized, causing program crashes or random printing of large amounts of data HOT 1
- Regression: MemoryError: std::bad_alloc after v0.12.3 HOT 4
- Unable to add arbitrary addresses as exported functions HOT 3
- How to execute code before main entry point (using __mod_init_func)?
- Long section names in PE HOT 2
- installed by pip missing many attributes HOT 1
- Protections numbers meaning in Mach-O HOT 1
- `lief.PE.parse' function throws an out-of-range exception
- Python API missing `set_resources()` HOT 3
- Two issues in pe_reader (examples/c/pe_reader.c) HOT 1
- Symbol lookup error when swapping symbols name HOT 1
- Test binaries are not available HOT 1
- error: no declaration matches βLIEF::read_out_of_bound::read_out_of_bound(uint64_t) HOT 1
- Support for Rust demangle HOT 2
- Allocation-size-too-big in LIEF::MachO::init_c_sections
- Using std::isprint to determine may miss some strings HOT 1
- More pre-compilation targets for rust bindings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lief.