Closed icex2 closed 1 year ago
Dumb question, but did you test this? Just did a quick Google on the warning you mention in your OP and it sounds like we are missing linking to d3d9.lib
. Which, I would assume, will crash during runtime when trying to resolve references.
In GitLab by @Felix on Jun 16, 2021, 21:59
Project DIVA and Initial D Zero do not use Direct3D 9. Project DIVA uses OpenGL. Initial D Zero uses Direct3D 11. If they used Direct3D 9, then we would be using hooklib/gfx.c
but since they do not use Direct3D 9 we do not "link" to that, which causes the undefined reference error.
In GitLab by @Felix on Jun 16, 2021, 22:00
This is why chunihook
successfully compiles.
But we are including the hooklib/gfx.c
module apparently because otherwise, why would the compiler print the warning?
Do we even need that module for the games you listed?
Reference search on code base: https://dev.s-ul.net/search?utf8=%E2%9C%93&search=Direct3DCreate9&group_id=86&project_id=204&scope=&search_code=true&snippets=false&repository_ref=master&nav_source=navbar
In GitLab by @Felix on Jun 16, 2021, 22:03
We don't need it for those two games which is why I removed the export definition for that function since it isn't defined because gfx.c
is not being linked into the hook DLL for those two games.
Are you referring to the warning about resolving _Direct3DCreate9 by linking to _Direct3DCreate9@4
? If so, that warning is caused by stdcall function name mangling.
approved this merge request
unapproved this merge request
In GitLab by @Felix on Jun 16, 2021, 22:34
added 1 commit
approved this merge request
In GitLab by @Felix on Jun 17, 2021, 03:39
resolved all threads
In GitLab by @Felix on Jun 17, 2021, 03:40
added 5 commits
djhackers:master
In GitLab by @Felix on Jun 16, 2021, 19:57
Merges fix-warnings -> master
I got a few warnings and an undefined reference on
Direct3DCreate9
when building from the latest master. This MR fixes these minor issues.