Help With Make

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
1
2
cmake . -DMZ_BUILD_TEST=ON
cmake --build .


My question is, where are the compiled files?
git ls-files -o
Will list all the newly created files which are not being tracked by git.

Or do something like
find . -name "*.o"
@Salem c - that outputs the files I am trying to locate. How can I find where they are on my local machine?
What do you mean "on your local machine".

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 .

Is that not accurate?
Yeah, so all the files are in ~/Downloads/githubproject/
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.

I must be missing something here
Try adding an absolute path then.

A relative path really depends on what NetBeans considers to be the "current" directory when it's doing a build.
Forgive my ignorance here - what is the diff between an absolute and a relative path?

Adding a absolute path resolved it.
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.

Edit: Fixed typo.
Last edited on
Topic archived. No new replies allowed.