You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a library+executable package, executables that do not share their source directories with the library sources should be able to refer to exports from the library (as per #81). However the following setup fails to link.
(This repository provides a full project demonstrating the issue, see below for a summary).
-- src/FooBar.hsmoduleFooBarwhereimportPaths_foo_bar (version)
importData.Version
versionString = showVersion version
-- tools/test-foo-bar.hsmoduleMainwhereimportFooBar (versionString)
main =putStrLn$"The version is "++ versionString
Output
$ cabal build
[1 of 1] Compiling Main ( tools/test-foo-bar.hs, dist/build/test-foo-bar/test-foo-bar-tmp/Main.o )
Linking dist/build/test-foo-bar/test-foo-bar ...
Undefined symbols for architecture x86_64:
"_foozmbarzm0zi2_Pathszufoozubar_version1_closure", referenced from:
_foozmbarzm0zi2_FooBar_versionString_info in libHSfoo-bar-0.2.a(FooBar.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
The text was updated successfully, but these errors were encountered:
hanshoglund
changed the title
Fails to link Paths module from binaries in separate directory
Cabal fails to link Paths module from binaries in separate directory
Apr 8, 2014
hanshoglund
changed the title
Cabal fails to link Paths module from binaries in separate directory
Cabal fails to link Paths module to executables in separate directory
Apr 8, 2014
hanshoglund
changed the title
Cabal fails to link Paths module to executables in separate directory
Cabal fails to link Paths module to executables in separate directories
Apr 8, 2014
hanshoglund
added a commit
to music-suite/music-preludes
that referenced
this issue
Apr 9, 2014
In a library+executable package, executables that do not share their source directories with the library sources should be able to refer to exports from the library (as per #81). However the following setup fails to link.
(This repository provides a full project demonstrating the issue, see below for a summary).
Cabal file
Sources
Output
The text was updated successfully, but these errors were encountered: