Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b220cc67
Commit
b220cc67
authored
Jan 28, 2005
by
simonmar
Browse files
[project @ 2005-01-28 14:41:23 by simonmar]
x-ref INCLUDE pragmas
parent
da6eff29
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/docs/users_guide/phases.xml
View file @
b220cc67
...
...
@@ -500,12 +500,20 @@ $ cat foo.hspp</screen>
<para>
If you are compiling with lots of foreign calls, you may
need to tell the C
compiler about some
<literal>
#
include
</literal>
files. There is no real pretty
way to do this, but you can use this hack from the
command-line:
</para>
<literal>
#
include
</literal>
files. The Right Way to do this is to
add an
<literal>
INCLUDE
</literal>
pragma to the top of your source file
(
<xref
linkend=
"include-pragma"
/>
):
</para>
<programlisting>
{-# INCLUDE
<
X/Xlib.h
>
#-}
</programlisting>
<para>
Sometimes this isn't convenient. In those cases there's an
equivalent command-line option:
</para>
<screen>
% ghc -c '-#include
<
X/Xlib.h
>
' Xstuff.lhs
</screen>
<indexterm><primary><option>
-#include
</option></primary>
</indexterm>
</sect2>
<sect2
id=
"options-codegen"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment