COIN-OR::LEMON - Graph Library

Opened 15 years ago

Closed 15 years ago

#214 closed defect (fixed)

porting graph_to_eps.h for VS2005

Reported by: Tapolcai János Owned by: Alpar Juttner
Priority: minor Milestone: LEMON 1.1 release
Component: core Version: release branch 1.0
Keywords: VS2005 Cc:
Revision id: 861a9d5ff283

Description

The attached patch can fix some compiler errors of VS2005 for graph_to_eps.h.

The GetSystemTime? function is called with different type of variables under MSDev.

Attachments (2)

msdev_porting_861a9d5ff283.patch (1.7 KB) - added by Tapolcai János 15 years ago.
f39f0a140247.patch (1.7 KB) - added by Alpar Juttner 15 years ago.

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by Tapolcai János

comment:1 Changed 15 years ago by Alpar Juttner

Status: newassigned

comment:2 in reply to:  description Changed 15 years ago by Alpar Juttner

Version: hg mainrelease branch 1.0

Replying to jtapolcai:

The attached patch can fix some compiler errors of VS2005 for graph_to_eps.h.

Strange. As far as I can recall, graph_to_eps.h used to compile with VS2005. Was this really an error, of "just" a warning?

Anyway, your patch will not compile on VS2008, because it _MSC_VER is defined there, too. I changed the compiler version check to something better, see it in the attachment (changeset [f39f0a140247]). It works well with VS2008.

Could you please check if it works on VS2005, too?

Changed 15 years ago by Alpar Juttner

Attachment: f39f0a140247.patch added

comment:3 Changed 15 years ago by Tapolcai János

It compiles well under VS2005 as well

comment:4 Changed 15 years ago by Alpar Juttner

Resolution: fixed
Status: assignedclosed

We double checked it with Akos, and graph_to_eps_demo compiles well with VS2005. The possible reason for your failure is that you probably included windows.h or some other M$ quality header files in your code before graph_to_eps.h without

#define WIN32_LEAN_AND_MEAN
#define NOMINMAX

Without these defines windows.h does very nasty and stupid things, so you should put it into your code anyway.

On the other hand, I see no problem with the patch and sometimes it may help overcoming some problem so I merged it into both the main and the 1.0 branches, see [70aa52d30f13].

There was another problem with occasional redefining of the abode defines. It is fixed in [daddd623ac9a].

Note: See TracTickets for help on using tickets.