e-dant / watcher

Filesystem watcher. Works anywhere. Simple, efficient and friendly.
MIT License
639 stars 32 forks source link

Readme/Quick Start: Inaccurate 'Compile & Run' #13

Closed e-dant closed 1 year ago

e-dant commented 1 year ago

On Apple platforms, the user needs to link against two system libraries.

On most (all?) platforms, c++ should point to the platform's default C++ compiler.

We should change g++ to c++ and put something like $(uname | grep darwin && echo '-framework CoreFoundation -framework CoreServices') in the compile command from "Quick Start".

bosborne commented 1 year ago

I think it would be:

$(uname | grep Darwin && echo '-framework CoreFoundation -framework CoreServices')

e-dant commented 1 year ago

This is fixed on next:

EXTRAS=$(test "$(uname)" = Darwin && echo '-framework CoreFoundation -framework CoreServices')

c++ -std=c++2a -O3 src/tiny-main.cpp -o watcher $EXTRAS

./watcher