Git Product home page Git Product logo

Comments (6)

romainthomas avatar romainthomas commented on May 16, 2024

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.

JaceCear avatar JaceCear commented on May 16, 2024

(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.

romainthomas avatar romainthomas commented on May 16, 2024

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.

romainthomas avatar romainthomas commented on May 16, 2024

@JaceCearK1 I documented the configuration to use the Windows SDK: 67d759e

from lief.

JaceCear avatar JaceCear commented on May 16, 2024

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.

romainthomas avatar romainthomas commented on May 16, 2024

Now the documentation is available here: https://lief.quarkslab.com/doc/installation.html#windows-sdk

from lief.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.