COIN-OR::LEMON - Graph Library

Opened 8 years ago

Closed 8 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)

64260c0f58eb.patch (1.4 KB) - added by Alpar Juttner 8 years ago.
blue1.jpg (65.6 KB) - added by Smartmil8 4 years ago.
crooksandliars.com
Bob Foster.png (133.1 KB) - added by Smartmil8 4 years ago.
More about uptown espresso kitchens find by click this link
Ron Webb.jpg (167.8 KB) - added by Smartmil8 4 years ago.
http://kdkraftupwnkitchen.tumblr.com/
Bob Foster1.gif (1001 bytes) - added by Smartmil8 3 years ago.
this

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by Alpar Juttner

It seems that the WIN32 is not defined somehow. Strange.

comment:2 Changed 8 years ago by Alpar Juttner

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 8 years ago by Alpar Juttner

Attachment: 64260c0f58eb.patch added

comment:3 Changed 8 years ago by Alpar Juttner

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 8 years ago by Alpar Juttner

Resolution: fixed
Status: newclosed

[64260c0f58eb] has been merged to branches 1.1, 1.2, and main.

Changed 4 years ago by Smartmil8

Attachment: blue1.jpg added

Changed 4 years ago by Smartmil8

Attachment: Bob Foster.png added

More about uptown espresso kitchens find by click this link

Changed 3 years ago by Smartmil8

Attachment: Bob Foster1.gif added
Note: See TracTickets for help on using tickets.