Opened 12 years ago

Closed 12 years ago

#20 closed defect (invalid)

two patches to make Clp compile on MSVC with __stdcall default calling convention

Reported by: schoedl Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

It would be great if these two changes could be incorporated into Clp to make it compile when stdcall is set as the default calling convention.

Thanks a lot,

Arno

Attachments (2)

ClpSolve.cpp.orig.patch (472 bytes) - added by schoedl 12 years ago.
ClpMain.cpp.orig.patch (808 bytes) - added by schoedl 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by schoedl

Changed 12 years ago by schoedl

comment:1 Changed 12 years ago by ladanyi

I have a question before incorporating the patch:

Would the code compile and work properly if stdcall is *not* set as the default calling convention, or in COIN we have to make a choice and stick with that?

Does the compiler automatically define a macro that indicates the calling convention?

Thanks, --Laci

comment:2 Changed 12 years ago by ladanyi

  • Resolution set to invalid
  • Status changed from new to closed

A much simpler solution is to add a /Gz flag to your working copy of the project file. That will default every function call to stdcall.

Your patch changes only two functions, the rest would remain cdecl, which is a disaster waitig to happen. Much better if all functions in a library have the same calling convention.

I believe we should default to whatever cl defaults to, which is at the moment cdecl.

--Laci

Note: See TracTickets for help on using tickets.