Skip to content
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

Add generic AMPL interface. #36

Merged
merged 1 commit into from
Feb 16, 2015
Merged

Add generic AMPL interface. #36

merged 1 commit into from
Feb 16, 2015

Conversation

dpo
Copy link
Contributor

@dpo dpo commented Feb 16, 2015

No description provided.

@dpo
Copy link
Contributor Author

dpo commented Feb 16, 2015

Here is the interface. It builds into the static library, but I haven't yet been able to test it with ampl.jl because I'm not sure how to get it into the shared library.

@dpo dpo mentioned this pull request Feb 16, 2015
@dpo
Copy link
Contributor Author

dpo commented Feb 16, 2015

Is there a reason why compilation isn't occurring in c99 mode?

/home/travis/build/ampl/mp/src/asl/aslinterface.c:111:3: error: ‘for’ loop initial declarations are only allowed in C99 mode

@vitaut vitaut merged commit ff350ca into ampl:master Feb 16, 2015
@vitaut
Copy link
Contributor

vitaut commented Feb 16, 2015

I've merged this in with minor changes to fix errors when compiling without c99, better type safety and compatibility with C++.

As for the c99 mode, I guess it's just not the default on that compiler version. I don't add -std=c99 or anything like that as ASL doesn't require it. Anyway, I fixed it by compiling in C++ mode which also gives a better type safety.

I'll update the CMake config to include this into the shared library once I fix the master branch which is broken at the moment due to some unrelated refactoring.

Thanks!

tkelman referenced this pull request Feb 16, 2015
Also use `ASL *` instead of `void *` for better type checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants