lwIP - A Lightweight TCP/IP stack - Bugs: bug #53396, unit tests build broken for msvc
You are not allowed to post comments on this tracker with your current authentication level.
bug #53396: unit tests build broken for msvc
Submitter: | Joel Cunningham <jcunningham> | ||
Submitted: | Wed 21 Mar 2018 01:19:48 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | Fixed |
Privacy: | Public | Assigned to: | jcunningham |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | git head |
Wed 21 Mar 2018 09:11:59 PM UTC, comment #2: |
Joel Cunningham <jcunningham> |
Wed 21 Mar 2018 08:09:44 PM UTC, comment #1: A solution would be to define LWIP_TESTMODE on the command line (i.e. in the MSVC project settings). |
Simon Goldschmidt <goldsimon> |
Wed 21 Mar 2018 01:19:48 AM UTC, original submission:
Unit tests no longer build on msvc due to a link failure:
|
Joel Cunningham <jcunningham> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-03-21 | jcunningham | Status | None | Fixed | |
Assigned to | None | jcunningham | |||
Open/Closed | Open | Closed |
Powered by Savane 3.13-4448.
Corresponding source code
So it turned out to be a little stranger than I had thought.
For lwIP_Unittests, opt.h is already being included first before cc.h. I'm not sure where, but I verified it by testing the following in cc.h:
#ifdef LWIP_HDR_OPT_H
#error how is this in here?
#endif
And the error is present
For lwIP_Tests, opt.h is not included first (as expected).
So for now, I've just used
#if !defined(LWIP_TESTMODE) || !LWIP_TESTMODE
to guard:
void lwip_win32_platform_diag(const char *format, ...);
#define LWIP_PLATFORM_DIAG(x) lwip_win32_platform_diag x
(see commit 194dee99568eebda3b2deeb8cce19ca01095816e)
Both builds are working! We could do some additional cleanup if opt.h being included first before cc.h for lwIP_Unittests is undesirable longer term