#19868: interpreters build fails on cygwin
-------------------------------------+-------------------------------------
Reporter: gouezel | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-7.0
Component: porting: Cygwin | Resolution:
Keywords: | Merged in:
Authors: Sebastien Gouezel | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/gouezel/DL_IMPORT | 149e52928ffb5ef70599661e5f2d7e0fa6e6cda7
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by gouezel):
Replying to [comment:11 jdemeyer]:
> Why do you say that adding `DL_IMPORT` in `.h` files is "rather sensible
in general" if it always breaks?
Say you have a shared library `foo.dll` providing a function `bar` defined
in a header `foo.h`. Then, if you want to use the function `bar` from
another program, you will `#include foo.h`, and it is important that the
header says the function is in a dll, so the `DL_IMPORT` in the header is
what you want. This is the typical use case.
The problem happens if, when building `foo.dll`, you have several .o
files, say `foo.o` with the definition of `bar` (not yet prefixed by
`__imp_` since there is no dll yet), and another file that uses `bar`, and
therefore includes `foo.h` for the declaration. If there is DL_IMPORT in
the header, boom.
The classical solution, if I understand correctly, is to have some
`#ifdef`'s in the header file, to be able to desactivate conditionnally
the DL_IMPORT. This seems to require serious modifications in cython.
Given that the fix I propose is very simple, I would rather go for it.
--
Ticket URL: <http://trac.sagemath.org/ticket/19868#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.