Opened 14 years ago
Closed 14 years ago
#418 closed defect (fixed)
Compilation problem with CodeBlock + MinGW
Reported by: | Alpar Juttner | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.3 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
lemon/bits/windows.cc does not find sys/times.h
and also the tms
struct:
Building CXX object lemon/CMakeFiles/lemon.dir/bits/windows.cc.obj L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:43:23: error: sys/times.h: No such file or directory L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc: In function 'void lemon::bits::getWinProcTimes(double&, double&, double&, double&, double&)': L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:82: error: 'tms' was not declared in this scope L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:82: error: expected ';' before 'ts' L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:83: error: '_SC_CLK_TCK' was not declared in this scope L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:83: error: 'sysconf' was not declared in this scope L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:84: error: 'ts' was not declared in this scope L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:84: error: 'times' was not declared in this scope L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc: In function 'std::string lemon::bits::getWinFormattedDate()': L:\projects\ELTE\ProgOK2\mylemon\lemon\bits\windows.cc:113: error: 'ctime_r' was not declared in this scope make.exe[2]: *** [lemon/CMakeFiles/lemon.dir/bits/windows.cc.obj] Error 1 make.exe[1]: *** [lemon/CMakeFiles/lemon.dir/all] Error 2 make.exe: *** [all] Error 2 Process terminated with status 2 (0 minutes, 2 seconds) 8 errors, 0 warnings
I tried it with CodeBlock 10.5 using the official installer version bundled with MinGW.
Attachments (5)
Change History (9)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Ahh, the problem is that when -ansi
is given to g++
(MinGW
), then WIN32 is not defined.
In general, is there any benefit of using -ansi
? Why do we use it at all?
Changed 14 years ago by
Attachment: | 64260c0f58eb.patch added |
---|
comment:3 Changed 14 years ago by
Please find the attaches [64260c0f58eb], as an attempt to solve this issue. It does the following two things:
- Remove -ansi compilation flag
- Don't include sys/times.h when WIN32 is defined
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
[64260c0f58eb] has been merged to branches 1.1, 1.2, and main.
Changed 10 years ago by
Attachment: | Bob Foster.png added |
---|
More about uptown espresso kitchens find by click this link
It seems that the
WIN32
is not defined somehow. Strange.