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

Linking error #293

Closed
PhucVH888 opened this issue Nov 30, 2015 · 4 comments
Closed

Linking error #293

PhucVH888 opened this issue Nov 30, 2015 · 4 comments

Comments

@PhucVH888
Copy link
Contributor

I tried to compile the following example with extractor pattern

#!/usr/bin/env encorec -run

passive class Link {
  assoc : int
  next  : Link

  def link() : Maybe int {
    Just this.assoc }

}

class Main
  def main() : void {
    ()
  }

And I get the error message:

phuc:workspace vo$ encorec test.enc
Importing module String from /Users/vo/code/encore/bundles/standard/String.enc
ld: can't open output file for writing: test, errno=21 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
 *** Compilation failed with exit code 1 ***

the error message doesn't appear when I compiled it in the root folder of Encore's compiler.

  • If I compile the snippet from /Users/vo/code/encore then there is no error.
  • If I compile the snippet from /Users/vo/Dropbox/encore then the error appears.
@PhucVH888 PhucVH888 added the bug label Nov 30, 2015
@EliasC
Copy link
Contributor

EliasC commented Nov 30, 2015

This is not a bug in the String library! The error message is telling you that it cannot write to the file test in the current folder. Is there already a file called test in /Users/vo/Dropbox/encore?

@EliasC
Copy link
Contributor

EliasC commented Nov 30, 2015

(You should see the same error if you remove everything but the Main class)

@EliasC EliasC changed the title Linking error in the String library Linking error Nov 30, 2015
@PhucVH888
Copy link
Contributor Author

yes, there is already a folder name test, and when I rename the folder to test123, then re-compile the snippet, there is no error.

@EliasC EliasC removed the bug label Nov 30, 2015
@EliasC
Copy link
Contributor

EliasC commented Nov 30, 2015

That makes sense. You were trying to write an executable program to a file used as a folder, which was rejected by bash. Closing this now!

@EliasC EliasC closed this as completed Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants