I am using Eclipse 3.0.0 and the Haskell plugin 0.4.0. I am trying to build a project that requires the '-syslib lang' option to be passed to the compiler. Is it possible to do this with the plugin? I also tried adding the source directory for lang as an import library. But then to compile this source code the compiler needs the -cpp option. Is there way to do this? It would be nice if there was a way I could directly type in extra options for ghc.
no, both options cannot be set. The plugin supports currently only a subset of the ghc options. I think you are right, it should be possible to enter more options in an extra text field, if needed. Will add that in the next version.
Thanks && ciao,
Do you know of any work around for this?
Nothing short of hacking the plugin, provided you know Java and a little bit Eclipse development :-)
You would have to import the de.leiffrenzel.fp.* plugins into your workspace, making sure that you import at least the ghccompiler plugin as project with source folders. The place where the compiler command line ist constructed is in de.leiffrenzel.fp.haskell.ghccompiler.core.GhcCompiler.java.
Just add something like
cmdLine.add( "-syslib" );
cmdLine.add( "lang" );
and then export the plugin.
(You need only to export that one plugin, right-click the project, say 'Export', 'Deployable plugins and fragments', then select the ghccompiler plugin, choose 'Export as directory structure', name a temporary directory and say 'Finish'. You can then take the .jar file out of that directory and replace it in your Eclipse installation.)
Thanks, that worked!
So far this looks like a very cool plugin.
The latest version 0.5 has now a field on the preference page where extra options can be set. These options are passed to the compiler.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.