EOSERV Forum > EOSERV > EOSERV From Scratch Compiler Errors
Page: << 1 >>
EOSERV From Scratch Compiler Errors
Author Message
Post #200059 EOSERV From Scratch Compiler Errors

Hey all - 

I was trying to set up a local installation of EOSERV since I formatted my laptop's hard drive. I was following the EOSERV from scratch guide (on Windows) and I ran across a couple errors:

  1. c:\mingw\include\math.h|635|error: '_hypot' was not declared in this scope|
  2. c:\mingw\include\pthread.h|320|error: redefinition of 'struct timespec'|

I fixed both problems by editing the header files, and EOSERV builds and runs, but I don't like editing library headers, so I'm wondering if anyone has any other (better) suggestions.

The first one seems to be a bug in gcc: http://stackoverflow.com/questions/33749413/error-hypot-was-not-declared-in-this-scope

A quick search didn't turn up anything regarding the second error. I just put an include guard around one of the timespec definitions to fix it.

---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
7 years, 50 weeks ago
Post #200061 Re: EOSERV From Scratch Compiler Errors

wrt the second error:

http://mingw-users.narkive.com/NwGYpqXY/mingw-error-redefinition-of-struct-timespec#post3

I didn't read the entire thread, but from what I understand, mingw defines it's own timespec somewhere, which is slightly different from that in pthreads, so there might be compatibility issues with just removing it unless your pthreads dll was also compiled with it removed.

As for a solution, I have no idea, but one place to start would be making sure you're using the latest mingw(-w64) and pthreads-w32.

7 years, 50 weeks ago
Post #200065 Re: EOSERV From Scratch Compiler Errors

This is the only solution I've found. 

In Code::Blocks, go to Settings> then Compiler> then #Define and enter: HAVE_STRUCT_TIMESPEC

Edit: I can't find the site I found this on, I'll post if I find it. =/ It's probably not what you're looking for, but it's the only way I was able to compile the latest source. I'd like to know how to fix the issue properly, if there is a better or proper way to. 

---
EO Resources/Guides: â—„ eobud.boards.net â–º
7 years, 50 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > EOSERV From Scratch Compiler Errors