Skip to content

Install on Windows #12

Description

@lganzzzo

By @AlexandreHURDYK:

Ok I managed to compile that submodule on windows through trial and error. Here's my procedure :
As a prerequisite, you'll need the following things :

The OpenSSL header files, along with the libcrypto.lib and libssl.lib libraries.
A compiled installation of oatpp on "C:\Program Files (x86)\oatpp".

  • Create a directory where you want which will contain your stuff.

  • Launch the Windows console in administrator mode, go inside your directory.

  • $ git clone https://github.com/oatpp/oatpp-openssl.git

  • Create a directory somewhere else to put your OpenSSL files. I'd avoid putting these in the cloned repository however.

  • Inside your new directory, do the following :

    • Put libcrypto.lib and libssl.lib inside of that directory.
    • Create a new directory called "openssl" : this is very important, the name HAS to be openssl because the cmake seeks for headers inside a directory called "openssl". Otherwise, you will trigger a compilation error about defining the OPENSSL_ROOT_DIR variable, which is actually a dud.
    • Put all your include files in this new "openssl" directory.
  • Do the following console commands :

    $ cd oatpp-openssl
    $ MD build
    $ cd build
  • Do this command :

    cmake .. -DOPENSSL_ROOT_DIR={path to openssl libs} -DOPENSSL_INCLUDE_DIR={paths to openssl libs}

The -DOPENSSL variables are the parts you want to pay attention to. Creating a new environment variable actually somehow doesn't work on windows. You need to add and fill these two variables in your cmake command to valid it.
Both have the path to your openssl libs : that's not a typo. Your includes directory should be located in the same directory as your libraries, under the name "openssl" so the cmake script will actually find them.

  • Execute the following command:
    • For a debug build:

      $ cmake --build . --target INSTALL
    • For a release build:

      $ cmake --build . --target INSTALL --config Release
      ```​
      

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions