nimbuscontrols / EIPScanner

Free implementation of EtherNet/IP in C++
https://eipscanner.readthedocs.io/en/latest/
MIT License
233 stars 93 forks source link

ported to mingw (mxe/gcc10) #39

Closed luntik2012 closed 3 years ago

luntik2012 commented 3 years ago

network and types ifdef-s added for __linux__ and _WIN32 (no OSX), linked with ws2_32 for WIN32.

not tested in real applications.

didn't try to build on windows/mingw (i'll do it soon)

jadamroth commented 3 years ago

Thanks for submitting.

I'll test sometime this week on a real end device to make sure it still compiles and works properly on linux, mac, and windows

jadamroth commented 3 years ago

I noticed this fork a while ago where someone also implemented windows support, but they never submitted a pull request, and I never reviewed the code - https://github.com/shrddr/EIPScanner

I don't know if you referenced it or not, but it might be helpful.

jadamroth commented 3 years ago

Just got around to testing this.

I can confirm it works on linux (ubuntu 18.04), still need to test on windows. There's a lot of compile and library issues on OSX that need to be resolved before I can merge this pull request.

jadamroth commented 3 years ago

If you give me write permissions to your forked repo, I can pushed my fixed OSX changes where I can confirm it works on linux and osx.

Then if my changes still work for you on windows, I'll merge the pull request

jadamroth commented 3 years ago

Added commits for linux and macos. Please test windows

luntik2012 commented 3 years ago

I noticed this fork a while ago where someone also implemented windows support, but they never submitted a pull request, and I never reviewed the code - https://github.com/shrddr/EIPScanner

I don't know if you referenced it or not, but it might be helpful.

I've looked at this. Changes are almost the same, except I didn't touch whitespace, didn't change c++ version and didn't implemented/changed any new logic. Also, it's important to fix SO_RCVTIMEO usage for windows. Today I've tested it on windows and it's stable.

jadamroth commented 3 years ago

Thanks, I've reviewed changes.

Give me a few days, and I'll test with an end device

jadamroth commented 3 years ago

From my initial tests, everything appears to be working on both linux and mac. I'm unable to test with windows + mingw, so I'll assume from your replies that everything's working as it's supposed to be.

I'm going to merge this pull request into master and make a minor release (version 1.2.0). Any additional necessary changes will be in patch releases from new issues and pull requests.

Let me know if you run in to any other issues. I'll continue testing with macos and linux

Thanks for your contribution and using the library.