Comments (4)
We haven't seen issues involving bridged casts. Are you positive you have ARC enabled?
How did you set your project up? Is it imported? (Perhaps ARC settings aren't being preserved) If it's just some code you added after enabling ObjC support in MSVC then you can enable ARC per-file or per-project in the settings dialog.
Can I get a compiler log of the error you're seeing?
from winobjc.
I created a project this morning to demonstrate the issue. Also, this project was imported using vsimporter. Here's the VS log when attempting to build.
1>------ Build started: Project: WinObjC_Issue33 (WinObjC_Issue33\WinObjC_Issue33), Configuration: Debug Win32 ------
1> ConsumeRuntimeComponent.cpp
1> ..\..\WinObjC_Issue33\main.m
1> ..\..\WinObjC_Issue33\AppDelegate.m
1> ..\..\WinObjC_Issue33\ViewController.m
1>C:\winobjc\samples\WinObjC_Issue33\WinObjC_Issue33\ViewController.m(71,27): error : incompatible types casting 'CGPathRef' (aka 'id') to 'id' with a __bridge cast
1>C:\winobjc\samples\WinObjC_Issue33\WinObjC_Issue33\ViewController.m(72,25): error : incompatible types casting 'CGPathRef' (aka 'id') to 'id' with a __bridge cast
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Project can be downloaded here: https://www.dropbox.com/s/5hcvs7m6s15d4g9/WinObjC_Issue33.zip?dl=0
from winobjc.
Thanks for the example.
The reason this is happening is because the iOS version of CGPathRef is a struct*, a C type. Our version is an id, which means no bridge cast is necessary in this circumstance (you can't bridge cast from id to id - in fact you don't have to).
This is a bug in our code. Unfortunately our CGPathRef is an Objective C class called CGPath that has a few convenience methods on it. It should be a C struct with only state. This will be the case for some other Ref types as well (CGFont for example) but we've fixed up most of them already.
We're working on it! Sorry again.
from winobjc.
@TorreyBetts This issue should be fixed with newer versions of the bridge. Could you please check with the latest release and close the issue if it is resolved?
from winobjc.
Related Issues (20)
- What versions of Windows are supported? HOT 2
- Unable to activate Windows store app. HOT 4
- Switch to `__objc_msg_forward2` for better forwarding efficiency HOT 1
- Can not install winobjc with win10 HOT 1
- -[NSObject conformsToProtocol:] does not work.
- clang hangs when compiling using optimisation flag -Os HOT 2
- Does Windows Bridge supports Metal Framework? HOT 1
- Does Windows Bridge supports OpenGL? HOT 1
- G HOT 1
- On running ios project(in Objective-C) throws error
- c sharp
- Ggg
- hhh HOT 3
- Bring WinObjC to WSLg, either exclusive to CUDA and DX12, or for all Linux with Vulkan. HOT 1
- ()R
- This repo is missing important files HOT 1
- has anyone tried newer versions of VStudio w/ this project? HOT 6
- nugetizer-2017 online package is missing HOT 2
- Need some updated instructions re installation in newer VS versions (2019 and up) HOT 4
- 使用vs2019 编译错误,什么时候改为#include <typeinfo> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winobjc.