-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
Object File Collision Detection Part II: Visual Studio C++ modules #2177
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What seems to be the problem?
The bug is related to same modules with same file names in a project. The compiler puts everything under the same intermediate directory, due to generated project configuration. Later the linker cannot find either the first or the second module, depending on the compile order. In the past there was the same issue for C++ in Visual Studio 1182.
What did you expect to happen?
Premake should either set the macro "$(IntDir)%(RelativeDir)", which would solve a lot of other stuff that could happen, or extend the old logic to generate numbered file names also for modules.
The second option could interfere with other stuff that are beyond my knoweledge. As example IntelliSense seems to also build a lot of stuff, to be able to support modules.
What have you tried so far?
Fixed it manually in Visual Studio under:
" -> Right Click -> Properties -> Configuration Properties / C/C++ / Output Files"
Also checked everything around, the good thing with the macro, this issue would never ever happen again.
Before that I tried a lot around setting the objdir properly, but it seems that premake5 is limited in that case 283.
How can we reproduce this?
Yeah, just put a basic Visual Studio 2022 C++ 20 project with two modules in different directories with the same name. Premake generates the following for the second module:
Manual fix:
What version of Premake are you using?
premake5 5.0.0-beta2
Anything else we should know?
Thank you guys for this amazing build tool!
The text was updated successfully, but these errors were encountered: