- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am new to working with c++ and openvino. I have been trying to write a windows desktop application with the following code:
#include <opencv2/opencv.hpp> //opencv functionality
#include <inference_engine.hpp> //openvino inference engine
using namespace InferenceEngine;
int main()
{
Core myCore;
}
The code builds without errors but when I attempt to launch the program I have the following exception:
Unhandled exception at 0x00007FFC0A8A4F69 in main.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x00000037A2CFF590.
I was able to successfully build the openvino samples. Am I forgetting something?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to use openvino with python, but not c++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'main.exe' (Win32): Loaded 'C:\Users\ctwombly\source\repos\yolov4\x64\Release\yolov4.exe'. Symbols loaded.
'main.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\sysfer.dll'.
'main.exe' (Win32): Loaded 'C:\Users\ctwombly\source\repos\yolov4\x64\Release\inference_engine.dll'. Module was built without symbols.
'main.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'main.exe' (Win32): Loaded 'C:\Users\ctwombly\source\repos\yolov4\x64\Release\tbb.dll'.
'main.exe' (Win32): Loaded 'C:\Users\ctwombly\source\repos\yolov4\x64\Release\inference_engine_transformations.dll'. Module was built without symbols.
'main.exe' (Win32): Loaded 'C:\Users\ctwombly\source\repos\yolov4\x64\Release\ngraph.dll'. Module was built without symbols.
'main.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'.
'main.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1.dll'.
The thread 0x9a14 has exited with code 0 (0x0).
Exception thrown at 0x00007FFC0A8A4F69 in main.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000000CB924FF9F0.
Unhandled exception at 0x00007FFC0A8A4F69 in main.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000000CB924FF9F0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ct123,
Thank you for reaching out to us.
The std::bad_alloc means that you are out of memory. Can you share with us your targeted device for inferencing and step to reproduce the issue?
Sincerely,
Zulkifli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I fixed my issue. I forgot to include a link to inference_engine.lib for the linker in visual studio 2019 and some other environment settings. Currently working great.
Thanks,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ct123,
Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.
Sincerely,
Zulkifli

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page