Hi Hooman,
Well the place I looked for build instructions initially was on the GitHub page, for an INSTALL.MD or a reference on the Wiki, but couldn't find any there.
Naively I tried to do "make" in the root directory but that didn't work.
After some Googling I found the link to the docker setup.
Even though I work with git on a professional basis, I didn't know git submodules were a thing, so it took some figuring out.
This gave me the clue that the nas2d probably was a dependency, and that I should build that first.
After that I was able to compile OPHD, and then was able to launch the executable, only to be greeted with an error regarding a missing asset.
The data.zip is mentioned somewhere in the forum, but that too I had forgotten about.
The -4 flag in the wget command is so that it defaults to IPv4, as it seems to hang when I don't specify it.
I've now also got a debug build working in Eclipse (freshly downloaded 2020-03 version, c++ development edition):
- Import as Makefile Project (select the folder which contains the topmost makefile, this is usually the folder in which you checked out from git.)
- This should allow you to build the code based on the makefile (it will call the "all" targate by default)
- Should you require a debug build (handy if one wants to develop), we need to build our code with the debug information contained in it.
- To do so, edit the MakeFile, by adding the following target below the "all" target and its configuration:
.PHONY: debug
debug: DEPFLAGS += -g -O0
debug: $(EXE)
This appends some extra flags to the DEPFLAGS variable, the -g flag makes sure the debug info is added, and the -O0 (minus oh zero) flag makes sure no code optimizations when compiling are done so the debugger will still see everything as-is.
Save the makefile.
Then in Eclipse, in Project > Properties, select the C/C++ Build, and select the "Behavior" tab.
Here change the "Build (incremental build)" value from "all" to "debug".
Rebuild your code.
Set a breakpoint somewhere and launch the Debug configuration: