Wireshark-dev: Re: [Wireshark-dev] Function getaddrinfo() vanished in one of the later commits.
Date: Sun, 6 Jan 2019 11:23:06 +0100

I will check out if GLIB2 is really necessary for windows and make it conditionally if so.

And yes I'm intended to make the tool working in Linux and FreeBSD too. Because it is only using a socket connection to the device, it should be easy to get it working for any platform.

The hardest platform to get it working is windows so I started with that one.

Henri

On 6-1-2019 10:32, Roland Knall wrote:
That is in fact the correct solution. I am not really sure why GLIB2_LIBRARIES is needed in this general way, but you will always have to look at your cmake files from a cross-plattform POV to ensure, that your utility is being built on all platforms. It is strongly recommended, that you build your extcap on at least two different platforms (Linux and Windows for example) if you want your extcap to be included in the general wireshark build. Except if it provides a functionality only available on a specific platform, but then the inclusion in the build itself can be conditional (aka only build it, if you are on the correct platform).

cheers
Roland 

Am Sa., 5. Jan. 2019 um 22:35 Uhr schrieb hdv <henri.de.veer@xxxxxxxxx>:
On 5-1-2019 22:20, Guy Harris wrote:
> On Jan 5, 2019, at 1:08 PM, hdv <henri.de.veer@xxxxxxxxx> wrote:
>
>> wsutil is already in the dependency list. So its not in there.
> Please send us your modified version of extcap/CMakeLists.txt.

I fixed it: the function is in 'ws2_32' and I added it conditionally as
follow in my "snippet" (anagate is my target):

if(BUILD_anagate)

     set(anagate_LIBS
         wsutil
         writecap
         ${GLIB2_LIBRARIES}
         ${CMAKE_DL_LIBS}
     )
     if(WIN32)
         set(anagate_LIBS ${anagate_LIBS} ws2_32)
     endif(WIN32)

     set(anagate_FILES
         anagate-core.c
         anagate-intf.c
         extcap-base.c

     )
     set_executable_resources(anagate "anagate")
     add_executable(anagate ${anagate_FILES})
     set_extcap_executable_properties(anagate)
     target_link_libraries(anagate ${anagate_LIBS})
     install(TARGETS anagate RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
     add_dependencies(extcaps anagate)

endif()

Thanks for pointing out that is was "ws2_32" where this function is
located (your first reply was right).
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>               mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe