ssilverman / QNEthernet

An lwIP-based Ethernet library for Teensy 4.1 and possibly some other platforms
GNU Affero General Public License v3.0
81 stars 24 forks source link

Need to disable printf... #11

Closed wwatson4506 closed 2 years ago

wwatson4506 commented 2 years ago

Hey Shawn, I just started working with QNEthernet for the purpose of updating my FTP client and server libraries on the Teensy 4.1. Ran into an issue with using printf() in those libraries. I have an IO library that uses a POSIX style OS and for some reason printf() does not work when used with QNEthernet. It works with NativeEthernet. I guess there is a conflict of some sort. So to the point, I want to use your Ethernet library and was wondering if there was a way to disable printf() in QNEthernet?

ssilverman commented 2 years ago

Try defining the QNETHERNET_WEAK_WRITE macro in your build. Eg. add a -DQNETHERNET_WEAK_WRITE build flag. That will make QNEthernet’s version of _write() weak.

See also: https://github.com/ssilverman/QNEthernet/blob/fa3369284a90f8e26c0a9c82f395afecdf6f1642/README.md#stdio

wwatson4506 commented 2 years ago

Man that was quick, Thanks for responding. I will check it out. Seems a lot of things are going on with FTP, WIFI and the like right now:)

Edit: That fixed the problem:) Thanks.