'How to get configuration.h from configuration.h.in in OpenSSL?

I am working with the OpenSSL library for C++. I used this library in another project and it worked great. I carried it over to another project today and I'm having issues.

Two of the header files are .h.in files: opensslv.h.in and configuration.h.in.

In the first project, this was not an issue. But in my new project it gives me an error on this line #include <openssl/configuration.h> because configuration.h cannot be found:

...\include\openssl\opensslconf.h(14): fatal error C1083: Cannot open include file: 'openssl/configuration.h': No such file or directory

I understand there is no literal configuration.h file but from what I understand that configuration.h.in file should generate a configuration.h file right?

Does anybody have any idea why that might be happening? Maybe I changed something in the project properties?



Solution 1:[1]

.h.in is a template for a header file. .in suffix looks similar to autotools template files, but according to their FAQ, OpenSSL uses their own build system based on Perl. Anyway, you should call one of the Configure scripts, and build after that. Docs.

Solution 2:[2]

I'm unable to comment, but you need to provide more information about your directory structure. What do you mean by "carried it over"? This most likely sounds like it's happening due to something pointing to the wrong directory. What environment are you working in?

First thing I would do is double check that your project environment is looking in the correct directory for include files.

I also just found this answer that may be helpful to you as well: https://stackoverflow.com/a/31322172/2494727

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitrii Zabotlin
Solution 2 InterestingGuy