An open API service indexing awesome lists of open source software.

https://github.com/rockfordwei/csweet

demo how to use C++ in Swift 3.1/4.0
https://github.com/rockfordwei/csweet

cplusplus cplusplus-11 cpp cpp11 swift swift-package-manager

Last synced: 2 months ago
JSON representation

demo how to use C++ in Swift 3.1/4.0

Awesome Lists containing this project

README

        

# USING CPP IN SWIFT 4.1

This is a demo to show how to bridge C++ in your Swift source.

## C++11 Feature

To enable C++11 Feature, using `-std=c++11` flag, for example:

```
# build:
swift build -Xcxx -std=c++11

# build release:
swift build -c release -Xcxx -std=c++11

# test:
swift test -Xcxx -std=c++11

# run:
swift run -Xcxx -std=c++11
```

If using Xcode, then such flags as above must be set as well.