Alcaro / Flips

Floating IPS is a patcher for IPS and BPS files.
Other
309 stars 45 forks source link

MVSC: linking error for flips-w32.obj #77

Closed Miepee closed 1 month ago

Miepee commented 1 month ago

https://github.com/Miepee/Flips/actions/runs/9198647243/job/25301806729

grafik

Alcaro commented 1 month ago

Those aren't bugs in Flips. They're because MSVC ignored the -lgdi32 -lcomdlg32 -lcomctl32 etc arguments. GCC and MSVC use very different command line syntax, I'm surprised it got that far.

If you want to build Flips with MSVC, you'll need to teach the build scripts to emit a MSVC-compatible command line. I think the MSVC equivalent of -lgdi32 is gdi32.lib?

Long-term, the only sane solution is editing the makefile and make.sh, but as a short-term workaround/experiment, maybe you could set $env:LFLAGS='gdi32.lib comdlg32.lib comctl32.lib etc'?

Miepee commented 1 month ago

Hmm, wouldn't some of those get fixed if cmake would be used as a build-script instead of just pure make? My cpp knowledge is limited, but AFAIK cmake helps more with making compiler specific calls.

Alcaro commented 1 month ago

Yes, cmake solves that specific problem.

But instead, it brings several problems of its own.

I'm not sure if it's me being a cranky lil shit whining about stuff that was fixed years ago, or if it actually is difficult, but I've had plenty of bad experiences with cmake. Lots of hard-to-follow data flow that feels like a large number of global variables, frequent deprecations making maintenance labor-intensive, google often pointing to outdated information, and I don't like how it demands a separate build dir and doesn't let me run it from the repo root.

I'm not sure how it'd interact with PGO optimization demanding compiling the project twice, either.