Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on Windows #12

Open
lganzzzo opened this issue Jan 13, 2022 · 1 comment
Open

Install on Windows #12

lganzzzo opened this issue Jan 13, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@lganzzzo
Copy link
Member

lganzzzo commented Jan 13, 2022

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
      ```​
      
@lganzzzo lganzzzo added the documentation Improvements or additions to documentation label Jan 13, 2022
@dellarocca99
Copy link

Hi @lganzzzo

I'm trying to install this submodule in Windows.
I do have the OpenSSL header files, including the libcrypto.lib and libssl.lib.
However, I don't understand in these steps how the structure of the directories and files should be.
I also don't understand if I need all OpenSSL header files or just the libcrypto.lib and libssl.lib.

Hope you can help me, and thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants