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

Fortran API is not exported on Windows #249

Closed
econwang opened this issue Mar 15, 2019 · 1 comment
Closed

Fortran API is not exported on Windows #249

econwang opened this issue Mar 15, 2019 · 1 comment

Comments

@econwang
Copy link

I compile the lib with cmake and msvc, the resulting lib works well when call from a C program, but can not call from a fortran program, seems that it does not export fortran api nlo_*.

@stevengj
Copy link
Owner

Yes, it looks like you are right — on Windows, you need this __declspec(dllexport) decorator in order to export functions. For the regular C API, we have an NLOPT_EXTERN macro that adds this decorator as needed, but we aren't utilizing this in the Fortran API definitions.

@stevengj stevengj changed the title Not export fortran api Fortran API is not exported on Windows Mar 15, 2019
jschueller added a commit to jschueller/nlopt that referenced this issue Mar 15, 2019
stevengj pushed a commit that referenced this issue Mar 15, 2019
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

No branches or pull requests

2 participants