hust-marx / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

Mac compile bug - enable carbon and core graphics #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
firebreath 1.2 mac build

enable core graphics and carbon

try and compile - compile error in FactoryMainMac.cpp.

fix is: 

FB::PluginWindowCarbonCG *_createPluginWindow(NP_CGContext* context)

should be

FB::PluginWindowMacCarbonCG *_createPluginWindowCarbonCG(NP_CGContext*
context)

This will now compile but you'll then get a link error (need to link carbon lib)

I added the carbon lib in my project cmake

find_library(CARBON_FRAMEWORK Carbon)

target_link_libraries(${PROJNAME}
   ${PLUGIN_INTERNAL_DEPS}
       ${CARBON_FRAMEWORK}
   )

This works.

Original issue reported on code.google.com by YottoK...@gmail.com on 17 Sep 2010 at 12:37

GoogleCodeExporter commented 9 years ago

Original comment by taxilian on 17 Sep 2010 at 12:42

GoogleCodeExporter commented 9 years ago
I can't seem to reproduce this on trunk. Did this error occur in your own 
plugin project?

Plugin projects generated by fbgen previous to FireBreath version 1.2 will 
require some modification to get working with all the awesome new features 
we've added.

Original comment by amack...@gmail.com on 17 Sep 2010 at 6:22

GoogleCodeExporter commented 9 years ago
I started with trunk and generated a simple test project.  In the project 
PluginConfig.cmake file I set

# Mac plugin settings
set(FBMAC_USE_QUICKDRAW 0)
set(FBMAC_USE_CARBON 1)
set(FBMAC_USE_COCOA 1)
set(FBMAC_USE_COREGRAPHICS 1)
set(FBMAC_USE_COREANIMATION 0)

Note, I set FBMAC_USE_CARBON to 1 (by default it is 0).

run prepmac.sh and try and compile.  You should see the problem.

Original comment by YottoK...@gmail.com on 17 Sep 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Ah I see! Thanks for filing this. I'll fix it up ASAP.

Original comment by amack...@gmail.com on 17 Sep 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Fixed in dev.firebreath. Should be merged into trunk soon, and the next nightly 
should include the fix.

Original comment by amack...@gmail.com on 20 Sep 2010 at 9:08