I have fatal error LNK1181 when rebuild wireshark on Window
0
I am trying follow this instruction to build Wireshark on window: https://www.wireshark.org/docs/wsdg_h...
The build was successful and I was be able to run Wireshark.exe, so I started to follow this instruction to add the plugins for wireshark: https://blog.fjh1997.top/2019/03/29/s...
But after follow each steps, my plugins does not show the foo.ddl, I thought that I did something wrong for configuration of the plugins, so I decided to delete the build directory and build wireshark again just to make sure.
After doing everything I did the first time I built, it show this error:
Build FAILED.
"C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
"C:\Development\wsbuild64\wireshark.vcxproj.metaproj" (default target) (2) ->
"C:\Development\wsbuild64\wireshark.vcxproj" (default target) (147) ->
(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'C:\Development\wsbuild64\ui\qt\qtui.dir\RelWithDebInfo\mocs_compilation_Debug.obj' [C:\Development\wsbuild64\wireshark.vcxproj]
0 Warning(s)
1 Error(s)
I have tried to clean and then recompile again, but it still showing errors. So I decided to delete the directory, try to build it once more time, but unfortunately I still got this error and I do not know why. Can someone help me? I really appreciate, this is my first time working with Wireshark.
Edit: When I open folder C:\Development\wsbuild64\ui\qt\qtui.dir\RelWithDebInfo\
as shown in the error, there is no mocs_compilation_Debug.obj
, does this mean that I am missing 1 file? Is there any way I can add it?
Are you building with sources from git, or from a tarball? What is the git commit or version of the tarball?
Hi, I am building source from git, just like in the instruction from wireshark:
git clone https://gitlab.com/wireshark/wireshark.git
OK, it works for me and the buildbots, so is likely to be something local in your environment. Just be aware that when living on the bleeding edge of master that there may be occasional unintentional breakages. You can also check the buildbots to see if they can build: https://buildbot.wireshark.org/wiresh...
I'm not sure if you have done this but think you should try the "nuclear" option of deleting the build directory and generating a new build solution, preferably without your additions, and when that's working move on to adding the plugin.
yes thank you for your comment, I deleted the build directory and try once again but it still occurs the same error, maybe there is something in my environment, I will check and see if I installed everything before right. It just really confusing because it worked before.
Do you have all the required env vars setup correctly?
I have set the environment variable as following: In system variables, for variable path, I add new a new value to it: C:\Qt\5.15.2\msvc2019_64, is this right?
You need two:
Thank you! I did not set the WIRESHAR_BASE_DIR in the environment variable before, just only set it with cmd.
But after I set 2 those environment variable as you said, clean the build, and recompile again the same error still occurred.
In the project file (
C:\Development\wsbuild64\wireshark.vcxproj
), do all the "mocs_compilation" files end with_Debug
or just theQt
entry?From my build system, none of the entries have
_Debug
:Are you using the standard
cmake
andmsbuild
commands from the Developer's Guide?Hi, sorry for late reply, in the project file that you ask me, indeed the "mocs_compilation" end with
_Debug.obj
:And I am sure using standard commands from the Developer's Guide, I double checked every commands that I made.
So, now what should I do for the
wireshark.vcxproj
file?I noticed that in my
wireshark.vcxproj
just only has this lineI do not have any more about
mocs_compilation
like yours, what can be the reason?