NickHardeman/ofxBullet

OF 0.9.0 will require rebuilding the bullet library

kylemcdonald opened this issue · 10 comments

OF 0.9.0 will be shipping with libc++ for OSX 32-bit which will require libraries built with libstdc++ to be recompiled in order to link properly. @arturoc said he might be able to help with Bullet.

Ok. Glad to have libc++. I'm not great at compiling libs, but I will give it a go and then might ask @arturoc for some help if I get hung up. Should I test the new bullet libs with the master branch of OF for compatibility with 0.9.0?

yes, master is already using libc++ in 32bits and 64bits

Any idea of how to compile the library to make it work the addon on 0.9.0 master branch?

..On the examples projects I can swich to 32 bits. Maybe starting an empty project with Project Generator but loosing the 64 bits should work without re compiling?

@moebiussurfing What OS are you on? I was able to get it working with OSX. I had to copy an empty example from scripts/osx/template/ and then link all of the bullet 64bit headers and libs.

Is there a better way to create an empty XCode project other than copying the example from the scripts folder? There are no files in the projectGenerator folder. I called submodule update, but nothing happened. I tried running all of the scripts in the scripts folder, but they didn't build any example xcode projects. :/

Hey @NickHardeman thanks for your reply. I am in 10.10.5 and Xcode 6.4. I tried the same way for make an empty project you say too (scripts/osx/template/ ...etc). The only difference it's that I used the Xcode plugin OFPlugin to add the addon easy. I post here two screenshots about my addon project structure and the errors I am getting:

captura de pantalla 2015-08-28 a las 21 46 13

captura de pantalla 2015-08-28 a las 22 08 38

captura de pantalla 2015-08-28 a las 21 49 21

I tried selecting the target on release or debug and 32 or 64 bits getting the same errors above, and deleted all the libs folders except the /lib/osx/x86_64. I tried to drag and drop manually just the /lib/osx/x86_64 keeping the same folder structure... no success.

Any idea of what I am doing bad?

Hi @moebiussurfing, looks like 009 is adding some more events to ofRegisterMouseEvents. I updated the addon to specify the mouse events, so that OF is not looking for functions that are not there. Try using the updated ofxBulletWorldRigid files.

Hi @NickHardeman , I am trying to build a clean project without success. I am using 009 and your dev009 branch too. But I get this error about OpenCL framework:

captura de pantalla 2015-09-30 a las 17 40 40

I tried using using the ProjectGenerator and also with the OFPlugin to add the addons... also building with 32 or with 64 bits. I tried copying your EmptyExample too.
I have no idea why, but I have a previous project that is working fine, build on the same system and OF folder. That's the structure of the project. In this case it only has the 2.8.2 lib...:
captura de pantalla 2015-09-30 a las 17 47 59

ps: When adding the addon with OFPlugin, I used this tip too:
"When addons contain static libs, they will be added with absolute paths. This is due to a quirk in the Xcode API being used by OFXcodeMenu. If you intend to share a project with other people, it is recommended that you re-add static libs yourself (by right-clicking in the project navigator and selecting "Add Files To (project name)...", for example). "
'https://github.com/openframeworks/OFXcodeMenu'
And I am getting this new error:
captura de pantalla 2015-09-30 a las 18 09 37

Hi @moebiussurfing, can you take a look at a project.xcconfig file in one of the examples. That should have the proper static lib and include paths. Don't forget this line in the project.xcconfig: OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) $(OFX_BULLET_LIBS)
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OFX_BULLET_HEADERS)

and make sure they are coming through in the Header Search Paths and Other Linker Flags in Build Settings.
screen shot 2015-10-01 at 9 57 12 am
screen shot 2015-10-01 at 9 57 24 am

The project shouldn't require the OpenCL lib to compile. Maybe that is caused from dragging in the static libs and include headers. Try using the project.xcconfig approach.