-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing include in solver.h #2
Comments
Hi Ralf, Could you confirm if you have downloaded CPLEX and linked the libraries/source codes to your project? ilcplex/cplex.h should come with the CPLEX distribution. If yes, could you please elaborate on the kind of warnings you are seeing? Are they errors? |
Hello,
I have adapted the Makefile to reflect the (standard) installation
directory of CPLEX 12.10. In solver.h just cplexconst.h was included,
but the source calls several CPLEX routines, which are undeclared
without cplex.h.
Thus the compiler could not know whether these are of type int (which
they are) and cannot check the correctness of the number and types of
the parameters. For this reason the compiler issues a warning for every
call of a CPLEX function like e.g. CPXlpopt. These are not errors.
In order to get rid of these warnings and to secure parameter checking
by the compiler you could just change the line
#include <ilcplex/cplexconst.h>
In solver.h to
#include <ilcplex/cplex.h>
That include file includes cplexconst.h by itself.
So there is no error, just eliminating doubts of any user who now sees
the warnings when compiling SD.
Best regards
Ralf Gollmer
formerly: Fakultät f. Mathematik, Universität Duisbug-Essen
…On 09.08.2021 18:44, Semih Atakan wrote:
Hi Ralf, Could you confirm if you have downloaded CPLEX and linked the
libraries/source codes to your project? ilcplex/cplex.h should come
with the CPLEX distribution.
If yes, could you please elaborate on the kind of warnings you are
seeing? Are they errors?
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Triage notifications on the go with GitHub Mobile for iOS [3] or
Android [4].
Links:
------
[1] #2 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AE2X6GOPFMXMER7FMZR3IADT4AAWJANCNFSM5BZ23GUA
[3]
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
[4]
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
|
Hi Ralf. This is a good point, I recall facing some issues myself which had bothered me, and I am glad the solution is on record here. For transparency, I don't code on SD myself (but give basic support). I'll forward this to active developers. Thanks! |
There is a missing include for ilcplex/cplex.h in solver.h, leading to warnings for all CPLEX functions in the compilation of solver.c
The text was updated successfully, but these errors were encountered: