Page 1 of 1

"SIMPLEQ_INIT" wanted

Posted: Tue Mar 20, 2018 5:24 pm
by Gfast2
Hi ESP-IDF,

I got some library that need "SIMPLEQ_INIT", which is normally defined in queue.h.
I've figured out in queue.h, which can be find under "components/newlib/include/sys/", does not have this macro. :oops:

Have somehow supressed this error and let the code finished to compile. And I figured out macro "LIST_INSERT_HEAD" are different as the library supposed to be.

The error code looks like this:

Code: Select all

/home/gfast2/workspace/open62541_port03/build/open62541/open62541.c:3893:5: error: expected specifier-qualifier-list before 'SIMPLEQ_ENTRY'
     SIMPLEQ_ENTRY(UA_PublishResponseEntry) listEntry;
     ^
What does this means? Do I still have chance to let this library works?

Re: "SIMPLEQ_INIT" wanted

Posted: Wed Mar 21, 2018 7:59 am
by Gfast2
According to man page of queue, I figured out "SIMPLEQ_INIT" is not a standard macro for linux's queue API neither.

The library I mentioned above is my good old open62541 and the queue.h I've talked about is HERE

Re: "SIMPLEQ_INIT" wanted

Posted: Wed Mar 21, 2018 8:42 am
by Gfast2
All right ESP-IDF,

I think this is some linking issue. That means, this library do need its own "queue.h" while the others shouldn't use the micro definition from this queue...

It's kinka complicate to describe here. But I think I've change my strategie:

I won't use the ".h" and ".c" from this file, but the ".a" and ".h" instead. Through this way, all the macro defined in this library won't pollute macro definitions globally.

Cheers

Su