symbols: DSO missing from command line??
-
OK, I just changed my entire project to 6.2.2.
Why is /home/qy/Qt/5.12.12/gcc_64/lib/libQt5Widgets.so.5 library being used ?
Better yet, how do I fix it ?:-1: error: /home/qy/Qt/5.12.12/gcc_64/lib/libQt5Widgets.so.5: error adding symbols: DSO missing from command line
OK, that error is gone...pretty normal , errors just pile up with ONE goof...
OK, I am panicking , I cannot get pass "main"...
11:48:57: Starting /home/qy/Qt/Examples/Qt-5.12.12/widgets/mainwindows/mdi/mdi...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
11:48:58: /home/qy/Qt/Examples/Qt-5.12.12/widgets/mainwindows/mdi/mdi crashed.I had to "build" several times before I got clean run...
I do not mind errors , most of them are fixable , but this intermittent weird errors are driving me nuts.
Should I look into different OS ?
I need repeatable results, even errors...
Here is where the error is "generated "
on certain OS combinations
(the kid was on right track..)
Time to update and reboot..../*
\internal
Allows you to throw an exception without including <new>
Called internally from Q_CHECK_PTR on certain OS combinations
*/
void qBadAlloc()
{
#ifndef QT_NO_EXCEPTIONS
throw std::bad_alloc();
#else
std::terminate();
#endif
} -
@AnneRanch said in symbols: DSO missing from command line??:
Why is /home/qy/Qt/5.12.12/gcc_64/lib/libQt5Widgets.so.5 library being used ?
At compile time, because you still have a reference to the old libraries in your make files etc.
At run time, because an executable/library linked against that file is being loaded and trying to load it. Sometimes because of a fallback path built into the library and sometime because it appears in LD_LIBRARY_PATH.Better yet, how do I fix it ?
Specifically, by doing a fully clean build and making sure your run time environment is what you think.
In general, by describing the problem adequately and then working the problem methodically.
:-1: error: /home/qy/Qt/5.12.12/gcc_64/lib/libQt5Widgets.so.5: error adding symbols: DSO missing from command line
OK, that error is gone...pretty normal , errors just pile up with ONE goof...
OK, I am panicking , I cannot get pass "main"...So now you are saying you do not have this issue i.e. the one in the subject line. So what issue do you have?
I do not mind errors , most of them are fixable , but this intermittent weird errors are driving me nuts.
You are not alone.
Should I look into different OS ?
No. Thrashing about hoping for a random resolution without ever understanding the mode of failure is not a good strategy.
11:48:57: Starting /home/qy/Qt/Examples/Qt-5.12.12/widgets/mainwindows/mdi/mdi... terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 11:48:58: /home/qy/Qt/Examples/Qt-5.12.12/widgets/mainwindows/mdi/mdi crashed.
The error message clearly comes from a Qt 5 example, yet your post claims, "I just changed my entire project to 6.2.2." Are you debugging your code?
The program has attempted a memory allocation (operator new or operator new[] directly or indirectly ) that failed. Trying to allocate a 5GB block on a 32-bit machine, trying to allocate a 128MB block on a machine with only 64MB of RAM, trying to allocate a block bigger than the largest available free space in memory, loading binary incompatible libraries ... all possibilities. Even the Qt code you posted gives a clue. It mentions Q_CHECK_PTR which you can trivially find with a Google search. This is a defence mechanism against the unforeseen, not a problem in itself.
Cannot see your code, cannot help you fix your code
When the program crashes in your debugger you get a stack backtrace. Read down the list of calls (i.e from most recent function call to least) until you find the first line in your code that triggered the memory allocation issue. Start there, asking yourself how could this fail?