GithubHelp home page GithubHelp logo

mryssng / libharu-visualstudio2019 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 3.42 MB

Building libharu 2.3.0 with Visual Studio 2019

CMake 0.43% Makefile 0.08% Shell 0.06% C 82.91% C++ 0.09% C# 2.58% Pascal 1.83% VBA 1.93% Python 6.35% Ruby 0.73% Visual Basic .NET 2.68% Objective-C 0.33%

libharu-visualstudio2019's Introduction

Building libharu with Visual Studio 2019

Precondition

It required that libpng and zlib has been built with VS2019. Reference: Building libpng with Visual Studio 2019

The required directory structure is here.

    libharu-VisualStudio2019/             # root for building
    ├─ libharu-RELEASE_2_3_0/             # libharu
    ├─ lpng1637/                          # libpng (NOT included in this repository)
    └─ zlib-1.2.11/                       # zlib (NOT included in this repository)

Build libharu

  1. Copy libpng and zlib
    libpng: Copy "libpng16.lib" and "zlib.lib" from "libpng-VisualStudio2019\lpng1637\projects\vstudio\x64\Release Library" to "libharu-VisualStudio2019\libharu-RELEASE_2_3_0"

  2. Edit Script
    Open file "libharu-VisualStudio2019\libharu-RELEASE_2_3_0\script\Makefile.msvc_dll".
    Edit as below.

    • Line #14 PNG_PREFIX = ../../libpng to PNG_PREFIX = ../lpng1637

    • Line #18 ZLIB_PREFIX = ../../zlib to ZLIB_PREFIX = ../zlib-1.2.11

    • Line #30 CFLAGS=/MD -nologo -O2 -Iinclude -Iwin32\include -I"$(PNG_PREFIX)"\include -I"$(ZLIB_PREFIX)"\include -DHPDF_DLL_MAKE to CFLAGS=/MD -nologo -O2 -Iinclude -Iwin32\include -I"$(PNG_PREFIX)" -I"$(ZLIB_PREFIX)" -DHPDF_DLL_MAKE

    • Line #33 LDFLAGS= /LIBPATH:$(PNG_PREFIX)\lib /LIBPATH:$(ZLIB_PREFIX)\lib /LIBPATH:win32\msvc libpng13.lib zlib.lib to LDFLAGS= /LIBPATH:$(PNG_PREFIX)\lib /LIBPATH:$(ZLIB_PREFIX)\lib /LIBPATH:win32\msvc libpng16.lib zlib.lib

  3. Build with MS Build in Visual Studio 2019 Tools
    Launch "x64 Native Tools Command Prompt for VS 2019" and change directory to "build\libharu-RELEASE_2_3_0"
    Type below and Enter

    nmake -f script\Makefile.msvc_dll

    When the build is completed, you can see the below message.

    Finished generating code
            rename libhpdf.lib libhpdf.lib
            copy libhpdf.dll demo
            1 file(s) copied.

    The directory structure after building is here.

     libharu-VisualStudio2019/ 
     ├─ libharu-RELEASE_2_3_0/ 
     │   ├─ cmake/ 
     │   ├─ demo/ 
     │   ├─ doc/ 
     │   ├─ if/
     │   ├─ include/
     │   ├─ script/ 
     │   ├─ src/ 
     │   ├─ win32/
     │   ├─ .gitignore 
     │   ├─ CHANGES 
     │   ├─ CMakeLists.txt 
     │   ├─ INSTALL 
     │   ├─ Makefile.am 
     │   ├─ README 
     │   ├─ README_cmake# 
     │   ├─ build.mk 
     │   ├─ buildconf.sh 
     │   ├─ configure.in 
     │   ├─ libharu.DevPackage.cmake 
     │   ├─ libhpdf.dll 
     │   ├─ libhpdf.exp 
     │   ├─ libhpdf.lib 
     │   ├─ libpng16.lib 
     │   └─ zlib.lib
     │   
     ├─ lpng1637/
     └─ zlib-1.2.11/ 
    

    Completed! 😄

libharu-visualstudio2019's People

Contributors

mryssng avatar

Watchers

 avatar

Forkers

ppdelei

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.