I want to include openssl/ssl.h
, but that header doesn't contain the actual code but a relative path (../../ssl/ssl.h
). So, how should I set up my environment?
Asked
Active
Viewed 1,744 times
1

0xbadf00d
- 17,405
- 15
- 67
- 107
-
Does it work if you just include `openssl/ssh.h"? – slugonamission Nov 14 '11 at 15:15
-
That's what I've done, but as I said above `ssl.h` is just of one line: `../../ssl/ssl.h` - Kind of weird in my point of view. – 0xbadf00d Nov 14 '11 at 15:42
-
Depends really, it might just exist as a compatibility system to allow older software to compile still, or just because your distro does something strange. – slugonamission Nov 14 '11 at 16:05
-
@slugonamission - Yeah, but my problem is, that my software didn't compile, because my compiler reports errors when reading `../../ssl/ssl.h`. I'm using the newest release (openssl-1.0.0e). – 0xbadf00d Nov 14 '11 at 16:08
-
That's why I asked! What errors do you get? – slugonamission Nov 14 '11 at 20:10
-
@slugonamission - Maybe you've misunderstood me. I'm receiving the following (absolutely sensible) error message: `error C2059: syntax error : '.' C:\openssl-1.0.0e\include\openssl\ssl.h 1`. The question is, what's best practice to include openssl headers? I could change the include path, but I have many projects that include `
`. – 0xbadf00d Nov 15 '11 at 11:09 -
Also see [How to compile openssl with relative rpath](https://stackoverflow.com/q/9399677/608639) and [Build OpenSSL with RPATH?](https://stackoverflow.com/q/29858870/608639) It ensures you get the expected libraries at runtime. – jww Sep 14 '18 at 20:16
1 Answers
0
I'm guessing you're attempting to build on Windows, because the tarfile on a Linux or Unix machine should have fixed up all those symlinks. The short answer is that you're going to have to do all those fix-ups yourself on Windows and build your own include tree.
I'm fighting with this myself right now, and brute force is the only answer I've come up with. If OpenSSL changed often enough, I'd script it, but I really only have to do it once per release - and security updates are easy to diff to see what's changed.
-1000 points to Microsoft for not supporting true symlinks.

Chris K
- 11,996
- 7
- 37
- 65