Error while compiling on Mac OS X 10.8

  • jmeyer2k
    14th Feb 2013 Member 0 Permalink

    I get this error:

    scons: Reading SConscript files ...
    You must specify a platform to target
    Pardalote:The-Powder-Toy-master 2 school$ scons --macosx --64bit
    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build/src/PowderToySDL.o -c -w -std=c++98 -fkeep-inline-functions -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers -m64 -DLUACONSOLE -DGRAVFFT -D_GNU_SOURCE -DUSE_STDINT -D_POSIX_C_SOURCE=200112L -DUSE_SDL -DMACOSX -D_64BIT -DSTABLE -DX86 -Ibuild/src -Isrc -Ibuild/data -Idata -Ibuild/generated -Igenerated src/PowderToySDL.cpp
    src/PowderToySDL.cpp: In function ‘void ClipboardPush(char*)’:
    src/PowderToySDL.cpp:76: error: ‘PasteboardRef’ was not declared in this scope
    src/PowderToySDL.cpp:76: error: expected `;' before ‘newclipboard’
    src/PowderToySDL.cpp:78: error: ‘kPasteboardClipboard’ was not declared in this scope
    src/PowderToySDL.cpp:78: error: ‘newclipboard’ was not declared in this scope
    src/PowderToySDL.cpp:78: error: ‘PasteboardCreate’ was not declared in this scope
    src/PowderToySDL.cpp:78: error: ‘noErr’ was not declared in this scope
    src/PowderToySDL.cpp:79: error: ‘newclipboard’ was not declared in this scope
    src/PowderToySDL.cpp:79: error: ‘PasteboardClear’ was not declared in this scope
    src/PowderToySDL.cpp:79: error: ‘noErr’ was not declared in this scope
    src/PowderToySDL.cpp:80: error: ‘newclipboard’ was not declared in this scope
    src/PowderToySDL.cpp:80: error: ‘PasteboardSynchronize’ was not declared in this scope
    src/PowderToySDL.cpp:82: error: ‘CFDataRef’ was not declared in this scope
    src/PowderToySDL.cpp:82: error: expected `;' before ‘data’
    src/PowderToySDL.cpp:83: error: ‘PasteboardItemID’ was not declared in this scope
    src/PowderToySDL.cpp:83: error: ‘CFSTR’ was not declared in this scope
    src/PowderToySDL.cpp:83: error: ‘data’ was not declared in this scope
    src/PowderToySDL.cpp:83: error: ‘PasteboardPutItemFlavor’ was not declared in this scope
    scons: *** [build/src/PowderToySDL.o] Error 1
    scons: building terminated because of errors.

     

    I got a bunch of stuff installed and eliminated most of the errors, but, I can't figure this one out.

  • jacob1
    14th Feb 2013 Developer 2 Permalink
    ok, this one is probably my fault again (although after this is fixed the end result of my changes will be good).

    The clipboard code used to be in Misc.cpp, I moved it to PowderToySDL.cpp where it fit better. There is probably some include in Misc.cpp that I didn't move over, i'm thinking one of these:
    #ifdef MACOSX
    #include <mach-o/dyld.h>
    #include <ApplicationServices/ApplicationServices.h>
    #endif

    I don't know which one (or maybe both) is needed, so just copy both. One of those may also be needed for some other function in misc.cpp, like installing. I don't know if Mac supports that.


    Also, is there anything else in the source you had to change? It would be nice to fix them in the official source, I will make this change tomorrow.
  • jmeyer2k
    14th Feb 2013 Member 0 Permalink

    Nope, I just had to install lua 5.1 and fftw.

     

    EDIT: I don't think the fftw installation is working with powder toy because now I got this error:

    g++ -o build/powder64-legacy-x -lfftw3f -framework SDL -framework Lua -framework Cocoa -m64 build/src/Format.o build/src/Misc.o build/src/PowderToyRenderer.o build/src/PowderToySDL.o build/src/Style.o build/src/Update.o build/SDLMain.o build/src/bson/BSON.o build/src/cajun/elements.o build/src/cajun/reader.o build/src/cajun/writer.o build/src/cat/CommandInterface.o build/src/cat/LegacyLuaAPI.o build/src/cat/LuaBit.o build/src/cat/LuaButton.o build/src/cat/LuaCheckbox.o build/src/cat/LuaComponent.o build/src/cat/LuaLabel.o build/src/cat/LuaProgressBar.o build/src/cat/LuaScriptInterface.o build/src/cat/LuaSlider.o build/src/cat/LuaTextbox.o build/src/cat/LuaWindow.o build/src/cat/TPTSTypes.o build/src/cat/TPTScriptInterface.o build/src/client/Client.o build/src/client/GameSave.o build/src/client/HTTP.o build/src/client/MD5.o build/src/client/SaveFile.o build/src/client/SaveInfo.o build/src/client/ThumbnailBroker.o build/src/colourpicker/ColourPickerActivity.o build/src/console/ConsoleController.o build/src/console/ConsoleModel.o build/src/console/ConsoleView.o build/src/debug/ElementPopulation.o build/src/dialogues/ConfirmPrompt.o build/src/dialogues/ErrorMessage.o build/src/dialogues/InformationMessage.o build/src/dialogues/TextPrompt.o build/src/elementsearch/ElementSearchActivity.o build/src/filebrowser/FileBrowserActivity.o build/src/game/Brush.o build/src/game/GameController.o build/src/game/GameModel.o build/src/game/GameView.o build/src/game/PropertyTool.o build/src/game/SampleTool.o build/src/game/SignTool.o build/src/game/Tool.o build/src/game/ToolButton.o build/src/graphics/Graphics.o build/src/graphics/OpenGLGraphics.o build/src/graphics/RasterGraphics.o build/src/graphics/Renderer.o build/src/interface/Appearance.o build/src/interface/Button.o build/src/interface/Checkbox.o build/src/interface/Component.o build/src/interface/ContextMenu.o build/src/interface/DropDown.o build/src/interface/Engine.o build/src/interface/Label.o build/src/interface/Panel.o build/src/interface/ProgressBar.o build/src/interface/RichLabel.o build/src/interface/SaveButton.o build/src/interface/ScrollPanel.o build/src/interface/Slider.o build/src/interface/Spinner.o build/src/interface/Textbox.o build/src/interface/Window.o build/src/localbrowser/LocalBrowserController.o build/src/localbrowser/LocalBrowserModel.o build/src/localbrowser/LocalBrowserView.o build/src/login/LoginController.o build/src/login/LoginModel.o build/src/login/LoginView.o build/src/options/OptionsController.o build/src/options/OptionsModel.o build/src/options/OptionsView.o build/src/pim/Generator.o build/src/pim/Machine.o build/src/pim/Parser.o build/src/pim/Scanner.o build/src/pim/Token.o build/src/powdertoyjava/OpenGLCanvasWin32.o build/src/powdertoyjava/PowderToyJava.o build/src/preview/PreviewController.o build/src/preview/PreviewModel.o build/src/preview/PreviewView.o build/src/render/RenderController.o build/src/render/RenderModel.o build/src/render/RenderView.o build/src/resampler/resampler.o build/src/save/LocalSaveActivity.o build/src/save/ServerSaveActivity.o build/src/search/SearchController.o build/src/search/SearchModel.o build/src/search/SearchView.o build/src/search/Thumbnail.o build/src/simulation/Air.o build/src/simulation/Gravity.o build/src/simulation/Particle.o build/src/simulation/SaveRenderer.o build/src/simulation/Sign.o build/src/simulation/Simulation.o build/src/simulation/SimulationData.o build/src/tags/TagsController.o build/src/tags/TagsModel.o build/src/tags/TagsView.o build/src/tasks/Task.o build/src/tasks/TaskWindow.o build/src/tests/PowderInteractionMachine.o build/src/tests/VirtualMachineTest.o build/src/update/UpdateActivity.o build/src/virtualmachine/JustInTime.o build/src/virtualmachine/Operations.o build/src/virtualmachine/Syscalls.o build/src/virtualmachine/VirtualMachine.o build/src/simulation/elements/116.o build/src/simulation/elements/146.o build/src/simulation/elements/ACEL.o build/src/simulation/elements/ACID.o build/src/simulation/elements/AMTR.o build/src/simulation/elements/ANAR.o build/src/simulation/elements/ARAY.o build/src/simulation/elements/BANG.o build/src/simulation/elements/BCLN.o build/src/simulation/elements/BCOL.o build/src/simulation/elements/BGLA.o build/src/simulation/elements/BHOL.o build/src/simulation/elements/BIZR.o build/src/simulation/elements/BIZRG.o build/src/simulation/elements/BIZRS.o build/src/simulation/elements/BMTL.o build/src/simulation/elements/BOMB.o build/src/simulation/elements/BOYL.o build/src/simulation/elements/BRAY.o build/src/simulation/elements/BRCK.o build/src/simulation/elements/BREC.o build/src/simulation/elements/BRMT.o build/src/simulation/elements/BTRY.o build/src/simulation/elements/BVBR.o build/src/simulation/elements/C5.o build/src/simulation/elements/CAUS.o build/src/simulation/elements/CBNW.o build/src/simulation/elements/CLNE.o build/src/simulation/elements/CLST.o build/src/simulation/elements/CNCT.o build/src/simulation/elements/CO2.o build/src/simulation/elements/COAL.o build/src/simulation/elements/CONV.o build/src/simulation/elements/CRAY.o build/src/simulation/elements/DESL.o build/src/simulation/elements/DEST.o build/src/simulation/elements/DEUT.o build/src/simulation/elements/DLAY.o build/src/simulation/elements/DMG.o build/src/simulation/elements/DMND.o build/src/simulation/elements/DRIC.o build/src/simulation/elements/DSTW.o build/src/simulation/elements/DTEC.o build/src/simulation/elements/DUST.o build/src/simulation/elements/DYST.o build/src/simulation/elements/ELEC.o build/src/simulation/elements/EMBR.o build/src/simulation/elements/EMP.o build/src/simulation/elements/ETRD.o build/src/simulation/elements/EXOT.o build/src/simulation/elements/Element.o build/src/simulation/elements/FIGH.o build/src/simulation/elements/FILT.o build/src/simulation/elements/FIRE.o build/src/simulation/elements/FIRW.o build/src/simulation/elements/FOG.o build/src/simulation/elements/FRAY.o build/src/simulation/elements/FRME.o build/src/simulation/elements/FRZW.o build/src/simulation/elements/FRZZ.o build/src/simulation/elements/FSEP.o build/src/simulation/elements/FUSE.o build/src/simulation/elements/FWRK.o build/src/simulation/elements/GAS.o build/src/simulation/elements/GBMB.o build/src/simulation/elements/GEL.o build/src/simulation/elements/GLAS.o build/src/simulation/elements/GLOW.o build/src/simulation/elements/GOO.o build/src/simulation/elements/GPMP.o build/src/simulation/elements/GRAV.o build/src/simulation/elements/GUNP.o build/src/simulation/elements/H2.o build/src/simulation/elements/HFLM.o build/src/simulation/elements/HSWC.o build/src/simulation/elements/ICEI.o build/src/simulation/elements/IGNT.o build/src/simulation/elements/INSL.o build/src/simulation/elements/INST.o build/src/simulation/elements/INVIS.o build/src/simulation/elements/INWR.o build/src/simulation/elements/IRON.o build/src/simulation/elements/ISOZ.o build/src/simulation/elements/ISZS.o build/src/simulation/elements/LAVA.o build/src/simulation/elements/LCRY.o build/src/simulation/elements/LIFE.o build/src/simulation/elements/LIGH.o build/src/simulation/elements/LNTG.o build/src/simulation/elements/LO2.o build/src/simulation/elements/LOLZ.o build/src/simulation/elements/LOVE.o build/src/simulation/elements/LRBD.o build/src/simulation/elements/MERC.o build/src/simulation/elements/METL.o build/src/simulation/elements/MORT.o build/src/simulation/elements/MWAX.o build/src/simulation/elements/NBHL.o build/src/simulation/elements/NBLE.o build/src/simulation/elements/NEUT.o build/src/simulation/elements/NICE.o build/src/simulation/elements/NITR.o build/src/simulation/elements/NONE.o build/src/simulation/elements/NSCN.o build/src/simulation/elements/NTCT.o build/src/simulation/elements/NWHL.o build/src/simulation/elements/O2.o build/src/simulation/elements/OIL.o build/src/simulation/elements/PBCN.o build/src/simulation/elements/PCLN.o build/src/simulation/elements/PHOT.o build/src/simulation/elements/PIPE.o build/src/simulation/elements/PLEX.o build/src/simulation/elements/PLNT.o build/src/simulation/elements/PLSM.o build/src/simulation/elements/PLUT.o build/src/simulation/elements/PPIP.o build/src/simulation/elements/PQRT.o build/src/simulation/elements/PRTI.o build/src/simulation/elements/PRTO.o build/src/simulation/elements/PSCN.o build/src/simulation/elements/PSTE.o build/src/simulation/elements/PSTN.o build/src/simulation/elements/PSTS.o build/src/simulation/elements/PTCT.o build/src/simulation/elements/PUMP.o build/src/simulation/elements/PVOD.o build/src/simulation/elements/QRTZ.o build/src/simulation/elements/RBDM.o build/src/simulation/elements/REPL.o build/src/simulation/elements/RIME.o build/src/simulation/elements/SALT.o build/src/simulation/elements/SAND.o build/src/simulation/elements/SHLD1.o build/src/simulation/elements/SHLD2.o build/src/simulation/elements/SHLD3.o build/src/simulation/elements/SHLD4.o build/src/simulation/elements/SING.o build/src/simulation/elements/SLTW.o build/src/simulation/elements/SMKE.o build/src/simulation/elements/SNOW.o build/src/simulation/elements/SOAP.o build/src/simulation/elements/SPAWN.o build/src/simulation/elements/SPAWN2.o build/src/simulation/elements/SPNG.o build/src/simulation/elements/SPRK.o build/src/simulation/elements/STKM.o build/src/simulation/elements/STKM2.o build/src/simulation/elements/STNE.o build/src/simulation/elements/STOR.o build/src/simulation/elements/SWCH.o build/src/simulation/elements/TESC.o build/src/simulation/elements/THDR.o build/src/simulation/elements/THRM.o build/src/simulation/elements/TRON.o build/src/simulation/elements/TSNS.o build/src/simulation/elements/TTAN.o build/src/simulation/elements/URAN.o build/src/simulation/elements/VIBR.o build/src/simulation/elements/VINE.o build/src/simulation/elements/VOID.o build/src/simulation/elements/WARP.o build/src/simulation/elements/WATR.o build/src/simulation/elements/WAX.o build/src/simulation/elements/WHOL.o build/src/simulation/elements/WIFI.o build/src/simulation/elements/WIRE.o build/src/simulation/elements/WOOD.o build/src/simulation/elements/WTRV.o build/src/simulation/elements/YEST.o build/src/simulation/elements/dcel.o build/src/simulation/tools/AirTool.o build/src/simulation/tools/Cool.o build/src/simulation/tools/GravTool.o build/src/simulation/tools/Heat.o build/src/simulation/tools/NGrv.o build/src/simulation/tools/SimTool.o build/src/simulation/tools/Vac.o build/generated/ElementClasses.o build/generated/ToolClasses.o -lz -lbz2 -lfftw3f -lpthread -lm

    collect2: ld returned 1 exit status
    scons: *** [build/powder64-legacy-x] Error 1
    scons: building terminated because of errors.

     

    I think I might not have installed the dev version of it.

  • jacob1
    15th Feb 2013 Developer 0 Permalink
    I actually don't see any error there, that's all building correctly. Somthing with the linker might be broken?

    also I fixed the first error in the official source now.