Skip to content

Conversation

@gynt
Copy link
Contributor

@gynt gynt commented Jan 13, 2026

The WinMain cpp files should be "connected" to the reimplementation cpp files, otherwise the latter won't be included in the dll build. I propose to let the MainImplementation.cpp to include a OpenSHC.hpp file that includes all headers for classes and namespaces that have a reimplementation. This ensures that reccmp-reccmp can find the reimplementations.

@gynt gynt requested a review from TheRedDaemon January 13, 2026 15:38
@TheRedDaemon
Copy link
Contributor

The moment they are part of the actual src directory and build, they should be grabbed by reccmp, or what do you mean?
At least, that worked in my test. All annotated functions were handled (and the Main Func, which had no matches of course).

@gynt
Copy link
Contributor Author

gynt commented Jan 13, 2026

No in my tests in which I had a createMoat.cpp (which includes the TileMapState.hpp, I had to let the MainImplementation.cpp include the TileMapState.hpp as well for reccmp to be able to find createMoat. I can test again, but I am pretty sure.

@TheRedDaemon
Copy link
Contributor

TheRedDaemon commented Jan 13, 2026

Hm, maybe I fail to understand you at the moment:
At the moment of writing this, the config of reccmp uses the reccmp-project.yml to point to the "src" directory.
All annotations I made in "cpp" files at least were found in my case.

So, if the cpp is in the src folder and added to the file list I would assume it should work.
Unless it is stripped if it remains otherwise unused... EDIT: But I would have thought that at least the DLL and its templates would prevent this.

@TheRedDaemon
Copy link
Contributor

Made a local test involving a header and a cpp file, the cpp file only placed in the file list for CMake:
reccmp found the function I defined there (including the reccmp comment of course), even without the resolver.

Unrelated: This was the reason I asked ChatGPT. The old MSVC apparently do not remove unused functions by default. Or at least not all of them, it seems.

@gynt
Copy link
Contributor Author

gynt commented Jan 14, 2026

For me it worked again as well now. Let's put this idea on hold until I can accurately reproduce the issue.

@gynt gynt closed this Jan 14, 2026
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

Successfully merging this pull request may close these issues.

3 participants