• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by nay · Oct 04, 2013 at 02:13 AM · openglnative pluginosxxcode 5

OpenGL causing DllNotFoundException on OSX

Hi,

I am running the trial of unity pro 4.2.1f4 to see if it's a viable option for an upcoming gig at work. We are interested in using libcinder.org within a native plugin. OSX for now although windows soon. I have run the following example fine: http://docs.unity3d.com/Documentation/Manual/NativePluginInterface.html

but to recompile it I must change

 #include <OpenGL/OpenGL.h>

to

 #include <OpenGL/gl.h>

(both are in the OpenGL.framework)

However, after compiling it with Xcode 5 on OSX 10.8.5 successfully I place it in the Plugins folder and I get 'DllNotFOundException' error that points to the correct path of the bundle. From my googlings it seems this may be due to dependancies but I find this strange given the above was the only change I made to the example.

Any advice? I have no problem including libcinder and compiling but I get the same error so hopefully resolving the simpler issue above will fix this too.

Best, nay.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nay · Oct 04, 2013 at 04:34 AM 0
Share

If helpful my code is now here: https://github.com/naychrist/Cinder-UnityPlugin

the RenderingPluginExample folder is the same as the unity example. Inside there is an XCode3 folder with the original code and an XCode5 folder with my tweaks to get it compile.

The RenderingPlugin folder contains an XCode5 project that includes libcinder.org. If you have libcinder.org installed just point the $CINDER_PATH user defined variable to it in the project settings and it should compile.

avatar image ExpiredIndexCard · Oct 04, 2013 at 04:35 AM 0
Share

Please don't post a comment as an answer. I converted it to a comment for you :)

avatar image nay · Oct 04, 2013 at 04:36 AM 0
Share

sorry - thanks!

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by nay · Oct 14, 2013 at 03:17 AM

So it turns out that despite documentation regarding universal binaries the plugin will only load correctly if 32 bit when compiled with XCode 4.6 or 5 using any of the available compilers (LLVM 4.2, LLVM GCC 4.2, LLVM 5.0). I assume this is a Unity bug although at least I can get it to work for my purposes at the moment.

One other very annoying bug that came up is that Unity will only detect changes to the plugin when I reimport all assets (the refresh command does not work). This makes for incredibly slow development.

I have filed bug reports relating to both of these issues ( 569289 and 569290 ).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image guavaman · Jun 05, 2014 at 07:37 PM 0
Share

This is still happening with 4.5. I was pulling my hair out trying to figure out why my plugin worked only when compiled for 32 bit, then I changed it back to Universal and it still worked. Seriously, Unity, how hard is it to change one line in your documentation after all this time? Unity only importing the plugin on reimport all is a nasty, nasty bug that will give many an ulcer.

[1]: http://docs.unity3d.com/$$anonymous$$anual/PluginsForDesktop.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Using CVOpenGLTextureCache in Plugin on OSX - Get correct OpenGL context? 0 Answers

How can I build the rendering plugin example on OS X 10.10? 1 Answer

Rendering Android native view with OpenGL 0 Answers

ARB_sparse_texture support iOS / OSX 1 Answer

Native Mac Plugin: EntryPointNotFoundException 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges