Re: Probelm compiling code with spf.h included

Jasper Wallace <[email protected]>
Newsgroups gmane.mail.spam.spf.discuss
Message-ID <alpine.DEB.2.00.1011012018260.4558@yvzcvg>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.