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

Cannot define method vertices' because no Objective-C stub was pre-compiled for types ^{CGPoint=ff}@:'. Make sure you properly link with the framework or library that defines this message. #68

Open
peterseddon opened this issue Feb 8, 2014 · 5 comments

Comments

@peterseddon
Copy link

I'm having the above issue with Joybox when I run rake on a blank template (or any template) I am using rubymotion 2.22. I have tried the following:

gem uninstall joybox -a
gem install joybox
rm .repl_history
rake clean
rake

@n-studio
Copy link

Same issue here.
It works fine with RubyMotion 2.20.

@n-studio
Copy link

I filled a ticket to RubyMotion team.

@alloy
Copy link

alloy commented Feb 10, 2014

@CurveBeryl Could it be that you have manually fixed the bridgesupport files that you include in the repo? (vendor/**/*.bridgesupport)

@alloy
Copy link

alloy commented Feb 10, 2014

To all, what happens is that RubyMotion tries to generate BridgeSupport metadata files in the new build dir location. Before 2.21, this used to be the root of the vendor_project lib dir (e.g. vendor/MyLib), but this would lead to problems when building an app for multiple platforms. Now these are generated in, for instance, vendor/MyLib/build-iPhoneSimulator.

Joybox includes its own metadata files which are different from what the gen_bridge_metadata tool would generate, but these are no longer being used, because RM expects the BridgeSupport file to be in the platform-specific build dir.

We are going to apply a change in RM 2.23 that will pick-up BridgeSupport files in the root of a vendor_project dir or, if non exists, fall back to generating a BridgeSupport file of its own.

For now, what you could do is to patch /Library/RubyMotion/lib/motion/project/vendor.rb:

diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb
index a4416ef..bc9efa9 100644
--- a/lib/motion/project/vendor.rb
+++ b/lib/motion/project/vendor.rb
@@ -131,7 +131,7 @@ EOS
         headers = source_files.select { |p| File.extname(p) == '.h' }
         bs_files = []
         unless headers.empty?
-          bs_file = File.join(build_dir, File.basename(@path) + '.bridgesupport')
+          bs_file = File.basename(@path) + '.bridgesupport'
           if !File.exist?(bs_file) or headers.any? { |h| File.mtime(h) > File.mtime(bs_file) }
             FileUtils.mkdir_p File.dirname(bs_file)
             bs_cflags = (opts.delete(:bridgesupport_cflags) or cflags)
@@ -207,7 +207,7 @@ EOS
         end

         # Generate the bridgesupport file if we need to.
-        bs_file = File.join(build_dir, File.basename(@path) + '.bridgesupport')
+        bs_file = File.basename(@path) + '.bridgesupport'
         headers_dir = opts.delete(:headers_dir)
         if headers_dir
           project_dir = File.expand_path(@config.project_dir)

@n-studio
Copy link

n-studio commented Mar 5, 2014

Fixed with RubyMotion 2.23

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

3 participants