Closed hyperhello closed 1 year ago
You can specify the location of phosg by defining the cmake variable PHOSG_DIR, e.g. when you have phosg in a directory parallel to resource_dasm:
cmake -DPHOSG_DIR=../phosg .
Note that for that to work there must be a symlink (or hardlink) inside the phosg directory called "phosg" that points to "src" like so:
ln -s src phosg
That worked to link and run resource_dasm. Thank you very much. However I wasn't able to link the one after, m68kdasm. I'll keep trying, maybe there's an include or a config issue on my system.
[ 62%] Linking CXX executable m68kdasm
/usr/bin/ld: CMakeFiles/m68kdasm.dir/src/m68kdasm.cc.o: in function std::thread::thread<void (&)(std::function<bool (unsigned long, unsigned long)>&, std::atomic<unsigned long>&, std::atomic<unsigned long>&, unsigned long, unsigned long), std::reference_wrapper<std::function<bool (unsigned long, unsigned long)> >, std::reference_wrapper<std::atomic<unsigned long> >, std::reference_wrapper<std::atomic<unsigned long> >, unsigned long&, unsigned long, void>(void (&)(std::function<bool (unsigned long, unsigned long)>&, std::atomic<unsigned long>&, std::atomic<unsigned long>&, unsigned long, unsigned long), std::reference_wrapper<std::function<bool (unsigned long, unsigned long)> >&&, std::reference_wrapper<std::atomic<unsigned long> >&&, std::reference_wrapper<std::atomic<unsigned long> >&&, unsigned long&, unsigned long&&)': /usr/include/c++/9/thread:126: undefined reference to
pthread_create'
Edit: I added the following and succeeded.
set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) add_executable(m68kdasm src/m68kdasm.cc) target_link_libraries(m68kdasm PRIVATE Threads::Threads resource_file)
I'm trying to pull the pictures and sounds out of old HyperCard stacks in an environment where I don't have root/sudo so I can't install phosg as a library.
I've been playing with the make files to try to merge the two codebases. There's probably a trick to make it easy, since the macOS release.zip has all the binaries and they seem to run. Can we have a Debian release?