Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 1540f38

Browse files
authored
Merge pull request #50 from janhq/49-bug-windows-does-not-have-some-libs
bug fix: fix windows library issue
2 parents 5b59529 + 7e09315 commit 1540f38

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11

22
#include <climits> // for PATH_MAX
33
#include <drogon/drogon.h>
4-
#include <libgen.h> // for dirname()
5-
#include <unistd.h> // for readlink()
64

75
#if defined(__APPLE__) && defined(__MACH__)
86
#include <mach-o/dyld.h>
7+
#include <libgen.h> // for dirname()
8+
#elif defined(__linux__)
9+
#include <libgen.h> // for dirname()
10+
#include <unistd.h> // for readlink()
11+
#else
12+
#error "Unsupported platform!"
913
#endif
1014

1115
int main() {

0 commit comments

Comments
 (0)