Mailing List Archive

Probelm compiling code with spf.h included
Hello,

I'm using 64bit Archlinux and installed spf from source. Everythink went ok,
i got no errors and I'm able to run example program. Problem occurs when I'm
trying compile main own code with spf. I'm using Eclipse 3.6.1 and when i
include spf.h to my project (#include <spf2/spf.h>) i get this errors on
compilations:

**** Build of configuration Debug for project Pokus ****

make all
Building file: ../src/Pokus.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Pokus.d"
-MT"src/Pokus.d" -o"src/Pokus.o" "../src/Pokus.cpp"
In file included from /usr/local/include/spf2/spf_response.h:167:0,
from /usr/local/include/spf2/spf_record.h:25,
from /usr/local/include/spf2/spf_server.h:21,
from /usr/local/include/spf2/spf.h:27,
from ../src/Pokus.cpp:11:
/usr/local/include/spf2/spf_request.h:29:18: error: field ‘ipv4’ has
incomplete type
/usr/local/include/spf2/spf_request.h:30:19: error: field ‘ipv6’ has
incomplete type
In file included from /usr/local/include/spf2/spf_dns.h:113:0,
from /usr/local/include/spf2/spf_server.h:22,
from /usr/local/include/spf2/spf.h:27,
from ../src/Pokus.cpp:11:
/usr/local/include/spf2/spf_dns_rr.h:33:20: error: field ‘a’ has incomplete
type
/usr/local/include/spf2/spf_dns_rr.h:37:21: error: field ‘aaaa’ has
incomplete type
make: *** [src/Pokus.o] Error 1


I tried inspect mentioned header files, but everything looks ok to me. Can
anybody point me what to do? Any help will be appreciated.
Thank you and sorry for my English.



-------------------------------------------
Sender Policy Framework: http://www.openspf.org [http://www.openspf.org]
Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/]

Archives: https://www.listbox.com/member/archive/735/=now
RSS Feed: https://www.listbox.com/member/archive/rss/735/1311532-17d8a1ba
Modify Your Subscription: https://www.listbox.com/member/?member_id=1311532&id_secret=1311532-f2ea6ed9
Unsubscribe Now: https://www.listbox.com/unsubscribe/?member_id=1311532&id_secret=1311532-bdbb122a&post_id=20101024045747:C4C861AE-DF4C-11DF-B523-8C2F86372C3E
Powered by Listbox: http://www.listbox.com
Re: Probelm compiling code with spf.h included [ In reply to ]
On Sun, 24 Oct 2010, Dunmer wrote:

> Hello,
>
> I'm using 64bit Archlinux and installed spf from source. Everythink went ok,
> i got no errors and I'm able to run example program. Problem occurs when I'm
> trying compile main own code with spf. I'm using Eclipse 3.6.1 and when i
> include spf.h to my project (#include <spf2/spf.h>) i get this errors on
> compilations:
>
> **** Build of configuration Debug for project Pokus ****
>
> make all
> Building file: ../src/Pokus.cpp
> Invoking: GCC C++ Compiler
> g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Pokus.d"
> -MT"src/Pokus.d" -o"src/Pokus.o" "../src/Pokus.cpp"
> In file included from /usr/local/include/spf2/spf_response.h:167:0,
> from /usr/local/include/spf2/spf_record.h:25,
> from /usr/local/include/spf2/spf_server.h:21,
> from /usr/local/include/spf2/spf.h:27,
> from ../src/Pokus.cpp:11:
> /usr/local/include/spf2/spf_request.h:29:18: error: field ‘ipv4’ has
> incomplete type
> /usr/local/include/spf2/spf_request.h:30:19: error: field ‘ipv6’ has
> incomplete type
> In file included from /usr/local/include/spf2/spf_dns.h:113:0,
> from /usr/local/include/spf2/spf_server.h:22,
> from /usr/local/include/spf2/spf.h:27,
> from ../src/Pokus.cpp:11:
> /usr/local/include/spf2/spf_dns_rr.h:33:20: error: field ‘a’ has incomplete
> type
> /usr/local/include/spf2/spf_dns_rr.h:37:21: error: field ‘aaaa’ has
> incomplete type
> make: *** [src/Pokus.o] Error 1
>
>
> I tried inspect mentioned header files, but everything looks ok to me. Can
> anybody point me what to do? Any help will be appreciated.
> Thank you and sorry for my English.

I think that including <netinet/in.h> and <netinet6/in6.h> before you
include <spf2/spf.h> will fix the problem.

--
[http://pointless.net/] [0x2ECA0975]

-------------------------------------------
Sender Policy Framework: http://www.openspf.org [http://www.openspf.org]
Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/]

Archives: https://www.listbox.com/member/archive/735/=now
RSS Feed: https://www.listbox.com/member/archive/rss/735/1311532-17d8a1ba
Modify Your Subscription: https://www.listbox.com/member/?member_id=1311532&id_secret=1311532-f2ea6ed9
Unsubscribe Now: https://www.listbox.com/unsubscribe/?member_id=1311532&id_secret=1311532-bdbb122a&post_id=20101101161931:550A71D6-E5F5-11DF-84AA-AF4B9927D38D
Powered by Listbox: http://www.listbox.com