has no toolbar. It's a very simple application, and I do understand
above, or at least that is what I am lead to assume. Maybe it is just
Joseph M. Newcomer wrote:
Code is irrelvant. You're trying to run a link while you have a copy of the program
running. It is reasonably important that you undestand what a compiler does, what a linker
does, and what execution does. Your code won't have any relevance until it executes,
unless it calls a function that you haven't supplied the object file for (in which case
the linker gives an undefined symbol error) or it calls a function you haven't supplied a
definition for, in which case the compiler gives you an undefined symbol error. You did
not get an undefined symbol error. Admittedly the error message explanation in the MSDN is
a bit cryptic, but the reason it doesn't have write permission is that the file is open
because the program is running.
Perhaps you would be effectively served if you deleted the [!] button from the toolbar.
This usually leads to erroneous testing procedures, and it should never be used during
development by beginners.
joe
On 10 Jul 2006 17:03:03 -0700, "Sleepster" <TheFakeJon@gmail.com> wrote:
void myClass::OnBnClickedBrowseOutput()
{
UpdateData(TRUE);
CFileDialog openDlg( TRUE, _T("*.*"), NULL, OFN_HIDEREADONLY, NULL);
if( openDlg.DoModal() == IDOK )
{
output = openDlg.GetPathName();
UpdateData(FALSE);
}
}
The code above is how I open a CFileDialog in order to grab the path
name. The problem I am having is that when execute my code and click
on the browse button, it seems to work fine. I close my application
and rebuild it, and when I rebuild it, it tells me this:
LINK : fatal error LNK1168: cannot open ../../../bin/myfile.exe for
writing
It does this everytime. In order for me to fix the problem, I have to
go to the project properties and change the output directory so that it
will allow me rebuild. The reason that it cannot open the file for
writing is because the file is still in use, even though the
application is not in use. I ran task manager to check to see if there
are instances of it, and there isn't.
So, I thikn that the problem is that I am using CFileDialog. I am
thinking that maybe the resources cannot be freed and thats why I can't
rebuild my application?
thanks
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm