crossroadlabs / Express

Swift Express is a simple, yet unopinionated web application server written in Swift
GNU General Public License v3.0
848 stars 47 forks source link

Unresolved identifiers issue #18

Closed HarshitDaftary closed 8 years ago

HarshitDaftary commented 8 years ago

I faced following error while running HelloWorld example.

/home/ubuntu/Projects/Project7/Packages/ExecutionContext-0.3.1/ExecutionContext/ExecutionContext.swift:162:15: error: use of unresolved identifier 'time_t'
    let sec = time_t(timeout)
              ^~~~~~
/home/ubuntu/Projects/Project7/Packages/ExecutionContext-0.3.1/ExecutionContext/ExecutionContext.swift:164:16: error: use of unresolved identifier 'time spec'
    var time = timespec(tv_sec:sec, tv_nsec: nsec)
               ^~~~~~~~
/home/ubuntu/Projects/Project7/Packages/ExecutionContext-0.3.1/ExecutionContext/ExecutionContext.swift:166:5: error: use of unresolved identifier 'nano sleep'
    nanosleep(&time, nil)
    ^~~~~~~~~
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/home/ubuntu/swift/swift2.2/usr/bin/swift-build-tool", "-f", "/home/ubuntu/Projects/Project7/.build/debug/ExecutionContext.o/llbuild.yaml"]
ypopovych commented 8 years ago

What Ubuntu and Swift versions are you use? Seems as some problem with imports on some Swift version.

HarshitDaftary commented 8 years ago

I use following ubuntu version Ubuntu 14.04.3 LTS

I use following Swift version Swift version 2.2-dev

ypopovych commented 8 years ago

Swift revision?

HarshitDaftary commented 8 years ago

I did swift --version

Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 42591f7cba) Target: x86_64-unknown-linux-gnu

Can you please suggest me how to get swift revision from terminal ?

ypopovych commented 8 years ago

Express works only on two latest development snapshots of Swift. So, please, update your Swift to latest development snapshot (at this moment 2016-03-01-a.)

HarshitDaftary commented 8 years ago

Ok. Thanks I will download newer version.

HarshitDaftary commented 8 years ago

Is this correct version ?

Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift fc261045a5) Target: x86_64-unknown-linux-gnu

Because I am facing this error with it

error: NoSources("/home/ubuntu/Projects/Project7/Packages/TidyJSON-1.1.0/Tests/TestCases")

ypopovych commented 8 years ago

Yes. Please read this instructions https://github.com/crossroadlabs/Express/blob/master/doc/gettingstarted/buildrun.md

HarshitDaftary commented 8 years ago

It works perfectly. Thanks :+1: