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

The symbol `*' does not fit here #33

Closed
ian-ross opened this issue Aug 1, 2013 · 2 comments
Closed

The symbol `*' does not fit here #33

ian-ross opened this issue Aug 1, 2013 · 2 comments
Labels

Comments

@ian-ross
Copy link
Member

ian-ross commented Aug 1, 2013

Bug imported from C2HS Trac

Trac ticket created: 2010-09-15T16:27:49-0700; last modified: 2010-09-18T06:07:34-0700


c2hs: C header contains errors:

/usr/include/cddb/cddb_cmd.h:79: (column 27) [ERROR] >>> Syntax error !
The symbol `*' does not fit here.

@ian-ross
Copy link
Member Author

ian-ross commented Aug 1, 2013

Original comment date: 2010-09-18T03:57:13-0700


I'm guessing that you're doing something like this:

module CDDB where

#include <cddb/cddb_cmd.h>

{# context prefix = "cddb_" #}

type Conn = {# pointer *conn_t #}

sites :: Conn -> IO Int
sites = {# call sites #}

It would be helpful to include such information in your bug reports so that developers can focus on the observed behaviour instead of having to figure out how to reproduce it.

This is not a c2hs bug. You are not supposed to include cddb_cmd.h directly; use cddb.h instead. FWIW, it would not work in C either:

> echo '#include <cddb/cddb_cmd.h>' > t.c; gcc t.c
In file included from t.c:1:
/usr/include/cddb/cddb_cmd.h:79: error: expected �)� before �*� token
...

#34 is the same mistake (use cdio.h instead of cdio/device.h).

On the assumption that the previous comment is correct, I'm closing the ticket. If the original bug reporter thinks this is wrong then please reopen the ticket and provide more details.

@mruegenberg
Copy link

For the benefit of people who arrive here through Google:
If you get a similar error message on newer OS X versions, try using GCC instead of LLVM, i.e

$ brew install gcc48
$ cabal install --with-gcc=gcc-4.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants