Skip to content

Incorrect README compilation instructions #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tanksdude opened this issue Apr 13, 2025 · 0 comments
Open

Incorrect README compilation instructions #354

tanksdude opened this issue Apr 13, 2025 · 0 comments

Comments

@tanksdude
Copy link

I may be misinterpreting the instructions, but they don't seem to be correct. I tested on Windows MSVC and Linux GCC, compiled by simply adding rpmalloc.[h|c]. Most of what I did was reading the README and experimenting with compilation settings to find out what worked and what didn't.

1.4.5 and main branch:

(Not sure how useful this section is since 2.0.0 seems to be nearing completion.)

On Windows platforms and C++ overrides you have to #include <rpnew.h> in at least one source file ...

I think this is also required on non-Windows platforms, but only when ENABLE_OVERRIDE is not enabled. And there is no include guard in the file, so "at least one" should be "only one".

ENABLE_OVERRIDE

Windows and Linux both need ENABLE_PRELOAD also enabled. GCC needed _GNU_SOURCE due to #include <dlfcn.h> and RTLD_NEXT.

latest develop branch:

For C++ overrides you have to #include <rpnew.h> in at least one source file.

I think this is Windows-only. I could not get it to compile on Linux due to redefining malloc/free/new/delete, and malloc.c implies it's Windows-only due to the #ifdef _WIN32 section, not to mention the #define __CRTDECL in rpnew.h. And no include guard so "at least one" → "only one".

other issue on 1.4.5

Maybe this is just MSVC being weird, but I had a strange issue where _msize_base needed to be noexcept to compile. I changed that, like a day or two passed, then went to recompile and that was no longer needed. I don't believe I updated anything during that timeframe and I haven't been able to reproduce that compilation issue. Has anyone else encountered this? My searches showed it was supposedly a Windows SDK issue, but I definitely didn't update that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant