I'm getting the build error below from the command prompt at building a dissector plugin using Wireshark 2.0 source and guide:
I had made version number modifications, thought I might have left a bad character on the text file so I got new files and left them untouched, ran the build with /t:Clean, re-ran the build and I am still getting this error. From Visual Studio 2013, getting the same build errors, I notice that the plugin.rc file gets auto-generated without most plugin-related information as if the data is not getting parsed correctly at build. Editing the file manually allows the build to complete successfully. I'd like to know what is preventing the version number along with other fields from getting to this file? I copied the moduleinfo.h and moduleinfo.nmake files from the gryphon plugin's folder and simply changed package name and version number. The README.plugins file states that the plugin.rc.in needs no editing. Thanks in advanced! asked 18 Dec '15, 07:38 coloncm edited 13 May '16, 07:23 |
One Answer:
As you appear to be using the CMake build, the nmake files are irrelevant. CMake processes the template file plugin.rc.in in the plugin directory using the call Have you got the template and the CMakeLists.txt file for your plugin, and is the call to answered 18 Dec '15, 08:36 grahamb ♦ showing 5 of 6 show 1 more comments |
Oh, good to know! Yes, I also included the CMakeList.txt from the gryphon plugin's folder and changed the lines as below:
...
set_module_info(foo 2 0 0 0)
set(DISSECTOR_SRC packet-foo.c )
...
add_plugin_library(foo)
...
Am I missing something?
So, after the CMake generation step the plug.rc file should be generated at the
path\to\your\build\plugins\foo\plugin.rc
.Is that the .rc file that you think is not being generated correctly?
Yes. When I open the solution in Visual Studio after the error and I rebuild it to view the error, I open the file for edit to manually enter the FILEVERSION (@[email protected]) entry, which comes up empty, with the version number, then run the build both in Visual Studio or the command prompt, it succeeds. But there are other entries that comes up empty such as the FileDescription (@[email protected]), FileVersion (@[email protected]), InternalName (@[email protected] @[email protected]), OriginalFilename (@[email protected]), ProductVersion (@[email protected]), and event Comments (Built with @[email protected]). This leads me to believe that parsing is not being done.
I can't see why your plugin CMakeLists.txt isn't transforming the plugin.rc.in file. Maybe you can add some debugging output to your CMakeLists.txt using the message function, e.g.
Do this before and after the
set_module_info()
call, delete plugin.rc from the build directory and run the CMake generation step again. Redirect the CMake generation output to a file to examine it, e.g.2>&1 > c:\temp\log.txt
.I think this may have been fixed in trunk.
Good to know! It's not a showstopper for me since the solution builds now. Thanks.