Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7746513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:17:51+00:00 2026-06-01T10:17:51+00:00

So the program compiles fine, and the executable is generated in $(SolutionDir)/Debug. When I

  • 0

So the program compiles fine, and the executable is generated in $(SolutionDir)/Debug. When I run the executable from the debug folder itself, the program successfully scans the folder placed in the dubug directory for files. However, when I execute the program from Visual Studio, the program will fail unless i input the global path of that directory to the FindFirstFile function. Why?

For example: I have to do this in order to debug the program from Visual Studio:

#ifdef _DEBUG
#define FILEPATH L"C:/Users/Steven/Documents/Visual Studio 2010/Projects/$(SolutionDir)/Debug/Effects/*.dll"
#else
#define FILEPATH L"Effects/*.dll"
#endif
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:17:52+00:00Added an answer on June 1, 2026 at 10:17 am

    Probably because when your application is running under the debugger, the working directory is not the project’s directory, but rather the debugger’s directory (or some other arbitrary directory that does not contain your DLL file).

    Check (and fix) this by opening up your project’s Properties and inspecting the Debugging settings. Specifically, Properties → Configuration Properties → Debugging. The “Working Directory” setting should be set to $(TargetDir).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a maven program, it compiles fine. When I run mvn test it
I have the following program which compiles fine and with no errors or warnings:
My python program (Python 2.6) works fine when I run it using the Python
I'm using MinGw on Windows 7. The following simple program compiles fine, but the
I configured Netbeans to run a program with Java Web Start. The program compiles
This program compiles fine but seg faults when running the value->getSmall in Period::display() .
I'm working with CMake, and my program compiles fine with g++. However, I also
The following C++ program compiles and runs as expected: #include <stdio.h> int main(int argc,
This program in C runs and compiles well : #ifdef HAVE_CONFIG_H #include <config.h> #endif
I have a program that performs some network IO that compiles a 32 bit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.