Ask Your Question
0

plugin build errors

asked 2018-05-09 21:53:06 +0000

updated 2018-05-09 21:55:49 +0000

Hi, I am trying to recompile a plugin on windows with VS2015. I am able to build wireshark from the sources. But when I add my Plugin to sources I got the following error message.

2>------ Build started: Project: pds, Configuration: Debug x64 ------ 
2>  Generating plugin.c 
2>  Traceback (most recent call last): 
2>    File "C:\Development\wireshark\tools\make-plugin-reg.py", line 78, in <module> 
2>      contents
    = file.read() 
2>    File "C:\Python36\lib\encodings\cp1252.py", line 23, in decode 
2>      return codecs.charmap_decode(input,self.errors,decoding_table)[0] 
2>  UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 6233: character maps to <undefined> 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.
    ========== Build: 1 succeeded, 1 failed, 15 up-to-date, 0 skipped
==========

What´s going wrong here, why won´t the plugin.c don´t be generated?

edit retag flag offensive close merge delete

Comments

cp1252

Is your plugin source only ASCII text? If not, is it in code page 1252, UTF-8, or some other extended ASCII?

Guy Harris gravatar imageGuy Harris ( 2018-05-09 22:02:07 +0000 )edit

Let me check something....

Christian_R gravatar imageChristian_R ( 2018-05-09 23:07:46 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-05-09 23:15:40 +0000

The sourcefiles contained some not allowed 0x81 characters. After deleting them, the plugin.c has could be build.

edit flag offensive delete link more

Comments

On Windows, we compile with the flag /utf-8 that indicates all source files are encoded in UTF-8.

grahamb gravatar imagegrahamb ( 2018-05-10 08:49:51 +0000 )edit

@grahamb: so you mean you use this command:

msbuild /utf-8 /m /p:Configuration=RelWithDebInfo Wireshark.sln
Christian_R gravatar imageChristian_R ( 2018-05-10 10:13:17 +0000 )edit

Nope, the flag is automagically added to the project files by our CMake files (along with many others).

See CMakeLists.txt around line 331.

grahamb gravatar imagegrahamb ( 2018-05-10 10:25:06 +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: 2018-05-09 21:53:06 +0000

Seen: 501 times

Last updated: May 09 '18