Ask Your Question
0

LNK2001 error building wireshark

asked 2021-02-17 12:36:14 +0000

blopblopblop gravatar image

In a clean virtual machine install I followed the x64 Win wireshark build instructions and while the cmake process completes correctly, the build stage fails with the program unable to find things related to Qt. Here's one line out of over 3600 errors:

export_object_dialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl QProgressBar::setValue(int)" (__imp_?setValue@QProgressBar@@QEAAXH@Z) [C:\Development\wsbuild64\wireshark.vcxproj]

edit retag flag offensive close merge delete

Comments

What is your QT5_BASE_DIR env var set to? What version of VS are you sing and what version of the source are you attempting to build?

grahamb gravatar imagegrahamb ( 2021-02-17 13:43:13 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-18 12:20:19 +0000

blopblopblop gravatar image

I found the solution for my problem. When downloading Qt I selected the 5.XX.X build, but i should have clicked on the additional packages and got the developer addons. even though the cmake step didnt require the additional addons, they were needed to build wireshark.

edit flag offensive delete link more

Comments

I just reinstalled Qt 5.15.2 and only selected the Qt 5.15.2\MSVC 2019 64 bit item and Wireshark built apart from a linker warning:

 qtmain.lib(qtmain_win.obj) : warning LNK4099: PDB 'qtmain.pdb' was not found with 'qtmain.lib(qtmain_win.obj)' or at 'C:\development\build\run\RelWithDebInfo\qtmain.pdb'; linking object as if no debug info

and installing the Qt Debug Information files fixes that linker error.

grahamb gravatar imagegrahamb ( 2021-02-18 16:04:48 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-02-17 12:36:14 +0000

Seen: 674 times

Last updated: Feb 18 '21