I am using OSX and want to compile and use the libraries from this GitHub repo https://github.com/nmoinvaz/minizip - I have downloaded the repo and cd into the directory and run these commands
If you've done something other than this, you need to tell us. mkdir foo
cd foo
git clone https://github.com/nmoinvaz/minizip
cmake . -DMZ_BUILD_TEST=ON
cmake --build .
The build files will be in some sub-directory below foo.
Either of the commands I posted would tell you where they are.
I did this:
1) navigated to the GitHub page
2) clicked clone or download button
3) clicked the download as a .zip button
4) cd to ~/Downloads/githubproject/
5) run the below commands
cmake . -DMZ_BUILD_TEST=ON
cmake --build .
If I update NetBeans and open the Project Properties and add to my C++ compiler to reflect this path ../../../Downloads/githubproject/ when I compile I still have build errors.
However, if I manually navigate to the directory ../../../Downloads/githubproject/ the .h file is actually there.
IDEs (Like NetBeans, Visual Studio, etc.) will often use their own "working directory" that the code or other commands execute from.
A relative path is relative to this working directory.
A global path always starts at the root of the system. ~/Downloads/githubproject/ counts as a global path, because ~ expands to /Users/Username ( '/' is the "root" directory).
For example, if the working directory is /User/Eddy/project, and you want to access a file /User/Eddy/my_file.txt, the relative path from the working directory to the file is ./../my_file.txt. (Often, the initial ./ can be omitted.)
One . means the current directory. The two .. means to go up one level.
This matters for opening files.
You can check the current directory that a script is executing from by entering pwd.