ido-static-recomp icon indicating copy to clipboard operation
ido-static-recomp copied to clipboard

Update recomp.cpp for msys2mingw64 capstone

Open MegaMech opened this issue 3 years ago • 5 comments

For some reason, capstone is installed weird. and has an extra capstone folder.

MegaMech avatar Dec 28 '21 23:12 MegaMech

So this patch seem to affect when _WIN32/_WIN64 are not defined, i.e. Linux for example?

Emill avatar Dec 28 '21 23:12 Emill

Yes Linux works fine with the default <capstone.h> windows appears to need capstone/capstone.h

MegaMech avatar Dec 28 '21 23:12 MegaMech

Can pkg-config to add the correct include path maybe, then we can only use <capstone.h>?

Emill avatar Dec 29 '21 00:12 Emill

No idea how that works. But if it works then sure.

MegaMech avatar Dec 29 '21 01:12 MegaMech

I'm actually working on build recomp for ARM macs, so this will be interesting the merge

But for pkg-config, here's what sm64 uses in their makfile:

`pkg-config --cflags --libs capstone`

So, you'd have something like

$(RECOMP): recomp.cpp elf.h
	$(CXX) $< -o $@ -std=c++11 -O2 -Wno-switch `pkg-config --cflags --libs capstone`

if you're still using the python build script, i'd guess you shell out to call pkg-config

tehzz avatar Dec 29 '21 17:12 tehzz