PDA

View Full Version : entry point not located in dynamic link library



spike6479
12th July 2020, 21:04
I have a program that when I build with 5.14.1 everything works fine. I can run from qtcreator and from outside qtcreator (I'm running win 10). When I build with 5.15.0 it runs fine from qtcreator, but when I try to run the exe directly I get the following entry point is not found:

_ZNK7QString5splitE5QChar6QFlagsIN2Qt18SplitBehavi orFlagsEENS2_15CaseSensitivityE

I am using all the same sources and simple switch to build with 5.15.0. I would appreciate some clues as to how to debug this. I'm being brief here as I'm not surewhat more information would be useful. I don't have the same symbol in the 5.14.1 map, but there is one that has Qt15Split instead of Qt18Split.

Thanks for any help you all can provide.

d_stranz
12th July 2020, 22:30
If you are building against Qt 5.15.0 then your free-standing executable also needs to load 5.15.0 Qt DLLs. The Qt Creator kit automatically changes the search path to load those DLLs when you run within the IDE, but your PATH variable probably contains the location of the 5.14.1 DLLs and those are what will be loaded when running standalone. Apparently there is a change between 5.14.1 and 5.15.0 in QString so you get a runtime error.

In Windows, you must run apples if you link to apples. Otherwise you get Windows DLL Hell.

spike6479
12th July 2020, 22:48
If you are building against Qt 5.15.0 then your free-standing executable also needs to load 5.15.0 Qt DLLs. The Qt Creator kit automatically changes the search path to load those DLLs when you run within the IDE, but your PATH variable probably contains the location of the 5.14.1 DLLs and those are what will be loaded when running standalone. Apparently there is a change between 5.14.1 and 5.15.0 in QString so you get a runtime error.

In Windows, you must run apples if you link to apples. Otherwise you get Windows DLL Hell.

Thanks that was the problem. Actually I had both 5.14.1 and 5.15.0 in the path; but 5.14.1 was first. It turns out that 5.14.1 programs will run with 5.15.0 (at least mine do).
Thanks again.

d_stranz
13th July 2020, 16:01
It turns out that 5.14.1 programs will run with 5.15.0 (at least mine do).

Generally the Qt folks work hard to make sure that newer libraries are backward compatible to as great as extent as possible, at least within a major version. But unless you have a crystal ball, it is hard to make them forward compatible.

spike6479
13th July 2020, 16:48
I may be mistaken, but I think the qt install added the library directories to the win path.

It took me a good bit of work to upgrade to using 5.15.0. I have 2 programs I wrote that both make use of QTableWidget and 5.15.0 broke them both by making the row height much larger than before (basically where I could fit 8 rows I could only fit 7). It took quit a bit of trial and error to figure out how to adjust the row height. I messed with sizeHints, style sheets, set height calls for QTableView, QTableWidget, QTableWidgetItem, until I found it was the vertical header, which was not shown, causing the problem.

FYI I had to add the following 2 changes:


verticalHeader()->setMinimumSectionSize(24);
verticalHeader()->resizeSection(row,38);

I really don't like hard coding the pixel height, but since they are programs for my own use it doesn't really matter.

Thanks again for your prompt replies, you have saved me much time.