Skip to content
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

not compatible with PCH #20

Closed
Trass3r opened this issue Feb 4, 2019 · 6 comments
Closed

not compatible with PCH #20

Trass3r opened this issue Feb 4, 2019 · 6 comments

Comments

@Trass3r
Copy link

Trass3r commented Feb 4, 2019

because it removes /ZI? At least cl was called without any /Z* debug option

error C2855: commandline option '/Z7' inconsistent with precompiled header

@crosire
Copy link
Owner

crosire commented Feb 4, 2019

PCH is a bit of an issue. Information about the compiled PCH is stored in the application PDB, but it can't be specified on the command-line or else the compiler will attempt to modify it, which won't work while the application is running. blink could copy it to a temporary location and specify that path to workaround this. But what then what happens if the user decides to modify the file generating the PCH? All future compiles would now reference the old PCH data from the application PDB, which no longer makes sense.

@Trass3r
Copy link
Author

Trass3r commented Feb 5, 2019

Yeah quite tricky, you could also try to disable PCH but most code out there probably does not compile both ways.

By the way what I tested was the Win32 (GUI) sample project VS generates. That uses PCH by default.

@crosire crosire closed this as completed in 0e4fd38 Feb 5, 2019
@ajweeks
Copy link

ajweeks commented May 20, 2020

@crosire It would be great if this limitation was advertised on the readme. Too bad it won't work, I was excited to try this out on my project!

@crosire
Copy link
Owner

crosire commented May 20, 2020

blink should still work, it will just take longer to compile a change, since it cannot make use of PCH data.

@ajweeks
Copy link

ajweeks commented May 21, 2020

It looks like it gets setup fine, but then once I make a code change (in this case to main.cpp) I get the following output:

Detected modification to: C:\Code\Flex\Flex\FlexEngine\src\main.cpp
main.cpp
C:\Code\Flex\Flex\FlexEngine\src\main.cpp(1): fatal error C1083: Cannot open include file: 'stdafx.hpp': No such file or directory
Finished compiling "C:\Code\Flex\Flex\FlexEngine\src\main.temp.obj" with code 2.

I'm compiling with /ZI, are there any other flags which are necessary? (Edit and Continue for example?)

@crosire
Copy link
Owner

crosire commented May 21, 2020

See #32 (comment)

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

3 participants