Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

Running programs inside the IDE (CTRL+F5)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janos Makadi - 15 May 2005 15:04 GMT
Hi,

I have a very interesting problem.

I wrote a little code which linked against an externel library. I have
the debug, and the release version of the ext. lib. One library function
opens a file which is in the same path as the executable. I copyed the
file into the Debug, and the Release directoryes too. Starting the
program directly from the folders (Debug, Release) causes no problem.
When I start it with CTRL+F5, in any configuration it failed to open the
file. When I used the debugger to see what's wrong, I found the lib's
fopen fails.

The code looks like this:

FILE* file = fopen("filename without the full path", "r");

If I use the full path the same thing happens.
I use Visual Studio .Net 2003.

Is there any difference running the program inside or outside the IDE?
What could be the problem?

THX
William DePalo [MVP VC++] - 15 May 2005 16:27 GMT
> Is there any difference running the program inside or outside the IDE?
> What could be the problem?

Probably the current directory. From the menu choose Project->Properties. In
the left pane under the "Configuration Properties" folder click the
"Debugging" item. In the right pane in the edit box labelled woking
directory set the directory to the debug or release folder as appropriate.

Regards,
Wil
Janos Makadi - 15 May 2005 16:36 GMT
William DePalo [MVP VC++] írta:
> Probably the current directory. From the menu choose Project->Properties. In
> the left pane under the "Configuration Properties" folder click the
> "Debugging" item. In the right pane in the edit box labelled woking
> directory set the directory to the debug or release folder as appropriate.

Oh, my god! How stupid I am.

Thaks a lot.
William DePalo [MVP VC++] - 15 May 2005 20:34 GMT
> Oh, my god! How stupid I am.

That's being too hard on yourself. The IDE has _so_ many configuration
options that even those of use who claim to know it well often get lost. :-)

> Thaks a lot.

You are welcome.

Regards,
Will

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.