can run C++ code from command line but not from debug mode in visual studio
I compiled the program below in debug mode without any error. I could run
.exe file from the command line but when I try to debug code inside visual
studio the exception gets thrown from the line DetectionInternalSettings*
internal_settings =
DetectionInternalSettingsFactory::createFromFileSystem("C:/data/card_detection_engine.yaml");
Anyone who faced this situation before where behavior is different running
from command line and in debug mode.
int main(int argc, char **argv)
{
DetectionSettings settings;
try
{
DetectionInternalSettings* internal_settings =
DetectionInternalSettingsFactory::createFromFileSystem("C:/data/card_detection_engine.yaml");
}
catch (const MyException &e)
{
fprintf(stderr, "Exception raised: %s\n", e.what().c_str());
return 1;
}
return 0;
}
No comments:
Post a Comment