Altering location of .ilk file

  • Thread starter Thread starter studennett
  • Start date Start date
S

studennett

Hi,

Is there any way to alter the location where this incremental link
information file is placed? It is always placed in the same location
as the generated .exe file, but I like to keep such 'intermediate'
files separate from my output files.

I've altered $IntDir, but this has no effect on the .ilk file.
 
I'm using Visual C++ 2005 Express Edition :)
There does not seem to be a way to do so. I have created a test project,
then manually pointed the output file itself to c:\temp\application.exe.
after a rebuild, the ilk file was also in c:\temp

there is a simple workaround though: set the output folder to the same
location as the intermediate directory. then create a post-build step to
explicitly copy the output files that you want to keep to the 'real' output
dir.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Good thinking Bruno. It seems to work.

I'm using

xcopy "$(OutDir)\*.exe" "$(SolutionDir)bin\" /Y
del "$(OutDir)\*.exe"

Where $(OutDir) points to $(SolutionDir)ilk

(The /Y says to overwrite the destination file if it already exists.)

The only problem is that Visual C++ rebuilds the exe file every time I
tell it to build, even though I haven't made any changes.

If I don't use the 'del' command on the 2nd line, then Visual C++ can't
tell if I've deleted the exe file in the bin directory, which isn't
brilliant either.

Any further ideas?
 
The only problem is that Visual C++ rebuilds the exe file every time I
tell it to build, even though I haven't made any changes.

If I don't use the 'del' command on the 2nd line, then Visual C++ can't
tell if I've deleted the exe file in the bin directory, which isn't
brilliant either.

why would you need to delete the exe anyway?
it shouldn't be a problem that it is both in outdir and in solutiondir\bin?

anyway, if there is a file copy problem, maybe you can add a pre-build step
to delete the output files in outdir.
that way they will be gone when the post-build step is executed.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top