[GHC] #5825: GHC can't build C program that uses exported Haskell function

GHC cvs-ghc at haskell.org
Tue Jan 31 23:21:57 CET 2012


#5825: GHC can't build  C program that uses exported Haskell function
-------------------------------+--------------------------------------------
  Reporter:  shelarcy          |          Owner:                  
      Type:  bug               |         Status:  closed          
  Priority:  normal            |      Milestone:                  
 Component:  Compiler (FFI)    |        Version:  7.4.1-rc2       
Resolution:  invalid           |       Keywords:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown      |     Difficulty:  Unknown         
  Testcase:                    |      Blockedby:                  
  Blocking:                    |        Related:                  
-------------------------------+--------------------------------------------
Changes (by igloo):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => invalid


Comment:

 You need to add `-no-hs-main` to the second command, or you will end up
 with 2 `main` functions in the executable: The one in your C file, and the
 one from GHC's RTS (which executes `Main.main`).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5825#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list