Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:22:47+00:00 2026-05-24T23:22:47+00:00

openFrameworks and cocos2d both have a wrapper for EAGLview.h , and of course you

  • 0

openFrameworks and cocos2d both have a wrapper for EAGLview.h, and of course you can’t just use both. Just adding both libraries (libcocos2d.a and libofxiPhone_iphoneos_Release.a) to my project gives a linker error:

ld: duplicate symbol _OBJC_METACLASS_$_ES1Renderer in /Developer/of_007_iphone/apps/cwi007/iTicTacToe/libofxiPhone_iphoneos_Release.a(ES1Renderer.o) and /Developer/of_007_iphone/apps/cwi007/iTicTacToe/libs/libcocos2d.a(ES1Renderer.o) for architecture armv7
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

I’m writing the core of my program in openFrameworks because it’s easy and C++. I want to put a UI, transitions, menus etc. in with cocos2d because it’s also easy and looks nice.

I tried

#define __OPENFRAMEWORKS__

in one .h file, and wrapping the other in

#ifndef __OPENFRAMEWORKS__
#endif

figuring I could “augment” the .h in openFrameworks with the extra bits added in by cocos2d, but then openFrameworks wouldn’t build because it no longer had a definition for EAGLview.

Is there a best practice for working with two libraries like this that both tap into the same low-level functionality, in this case CoreAnimation? Can I write my own class that inherits from them both? Is there a way to excise one of the .h files from my project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:22:47+00:00Added an answer on May 24, 2026 at 11:22 pm

    Try to include the cocos2d.h header where EAGLview.h is included in the original openFrameworks code (i.e. ofMain.h), or vice versa.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading a lot about openFrameworks and Processing, But still can't make
I have the following warnings while compiling an openFrameworks 007 project on Visual Studio
Trying to get Cocos2D and openFrameworks to play nicely together on iOS . Both
Can someone point me in the right direction to learning how to use Openframeworks
I have downloaded latest openframeworks library from github. I am able to run all
I am programming for the iPhone using openFrameworks. I ran the project in the
Just getting started with OpenFrameworks and I'm trying to do something that should be
I'm starting a project using the Aubio library within openFrameworks , so I'm copying
Using the Openframeworks library in C++, I have the radius of a glow (max_distance)
I am working in a project using openframeworks and I've been having some problems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.