Help, Compiling fail.

  • AdrianBerger
    30th Oct 2015 Member 0 Permalink

    I did everything as the wiki said. It's a fresh new TPT source, I havent added or done anything. I did as https://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html says. I am kinda new to coding and I am very interested what this "editing options" did.

    Should I change anything?

    1>------ Build started: Project: The Diamond Toy, Configuration: Release Win32 ------
    1> ElementClasses.cpp
    1> ToolClasses.cpp
    1> BSON.cpp
    1> elements.cpp
    1> reader.cpp
    1> writer.cpp
    1> Client.cpp
    1> GameSave.cpp
    1> HTTP.cpp
    1> MD5.cpp
    1> APIRequest.cpp
    1> ImageRequest.cpp
    1> RequestBroker.cpp
    1> ThumbRenderRequest.cpp
    1> WebRequest.cpp
    1> SaveFile.cpp
    1> SaveInfo.cpp
    1> DebugLines.cpp
    1> DebugParts.cpp
    1> ElementPopulation.cpp
    1> Generating Code...
    1> Compiling...
    1> Format.cpp
    1> Graphics.cpp
    1> OpenGLGraphics.cpp
    1> RasterGraphics.cpp
    1> Renderer.cpp
    1> ColourPickerActivity.cpp
    1> ConsoleController.cpp
    1> ConsoleModel.cpp
    1> ConsoleView.cpp
    1> ConfirmPrompt.cpp
    1> ErrorMessage.cpp
    1> InformationMessage.cpp
    1> SaveIDMessage.cpp
    1> TextPrompt.cpp
    1> ElementSearchActivity.cpp
    1> FileBrowserActivity.cpp
    1> Brush.cpp
    1> GameController.cpp
    1> GameModel.cpp
    1> GameView.cpp
    1> Generating Code...
    1> Compiling...
    1> PropertyTool.cpp
    1> SampleTool.cpp
    1> SignTool.cpp
    1> Tool.cpp
    1> ToolButton.cpp
    1> Appearance.cpp
    1> AvatarButton.cpp
    1> Button.cpp
    1> Checkbox.cpp
    1> Component.cpp
    1> ContextMenu.cpp
    1> CopyTextButton.cpp
    1> DropDown.cpp
    1> Engine.cpp
    1> Label.cpp
    1> Panel.cpp
    1> ProgressBar.cpp
    1> RichLabel.cpp
    1> SaveButton.cpp
    1> ScrollPanel.cpp
    1> Generating Code...
    1> Compiling...
    1> Slider.cpp
    1> Spinner.cpp
    1> Textbox.cpp
    1> Window.cpp
    1> LocalBrowserController.cpp
    1> LocalBrowserModel.cpp
    1> LocalBrowserView.cpp
    1> LoginController.cpp
    1> LoginModel.cpp
    1> LoginView.cpp
    1> OptionsController.cpp
    1> OptionsModel.cpp
    1> OptionsView.cpp
    1> PreviewController.cpp
    1> PreviewModel.cpp
    1> PreviewView.cpp
    1> ProfileActivity.cpp
    1> RenderController.cpp
    1> RenderModel.cpp
    1> RenderView.cpp
    1> Generating Code...
    1> Compiling...
    1> LocalSaveActivity.cpp
    1> ServerSaveActivity.cpp
    1> SearchController.cpp
    1> SearchModel.cpp
    1> SearchView.cpp
    1> Thumbnail.cpp
    1> Style.cpp
    1> TagsController.cpp
    1> TagsModel.cpp
    1> TagsView.cpp
    1> UpdateActivity.cpp
    1> CommandInterface.cpp
    1> LegacyLuaAPI.cpp
    1> LuaBit.cpp
    1> LuaButton.cpp
    1> LuaCheckbox.cpp
    1> LuaComponent.cpp
    1> LuaLabel.cpp
    1> LuaProgressBar.cpp
    1> LuaScriptInterface.cpp
    1> Generating Code...
    1> Compiling...
    1> LuaSlider.cpp
    1> LuaTextbox.cpp
    1> LuaWindow.cpp
    1> socket.lua.cpp
    1> TPTScriptInterface.cpp
    1> TPTSTypes.cpp
    1> Misc.cpp
    1>src\Misc.cpp(276): error C3861: 'min': identifier not found
    1>src\Misc.cpp(277): error C3861: 'min': identifier not found
    1>src\Misc.cpp(278): error C3861: 'max': identifier not found
    1>src\Misc.cpp(279): error C3861: 'max': identifier not found
    1> Platform.cpp
    1> OpenGLCanvasWin32.cpp
    1> PowderToyJava.cpp
    1> PowderToyRenderer.cpp
    1> PowderToySDL.cpp
    1> resampler.cpp
    1> Air.cpp
    1> 116.cpp
    1> 146.cpp
    1> ACEL.cpp
    1> ACID.cpp
    1> AMTR.cpp
    1> ANAR.cpp
    1> Generating Code...
    1> Compiling...
    1> ARAY.cpp
    1> BANG.cpp
    1> BCLN.cpp
    1> BCOL.cpp
    1> BGLA.cpp
    1> BHOL.cpp
    1> BIZR.cpp
    1> BIZRG.cpp
    1> BIZRS.cpp
    1> BMTL.cpp
    1> BOMB.cpp
    1> BOYL.cpp
    1> BRAY.cpp
    1> BRCK.cpp
    1> BREC.cpp
    1> BRMT.cpp
    1> BTRY.cpp
    1> BVBR.cpp
    1> C5.cpp
    1> CAUS.cpp
    1> Generating Code...
    1> Compiling...
    1> CBNW.cpp
    1> CFLM.cpp
    1> CLNE.cpp
    1> CLST.cpp
    1> CNCT.cpp
    1> CO2.cpp
    1> COAL.cpp
    1> CONV.cpp
    1> CRAY.cpp
    1> CRMC.cpp
    1> DCEL.cpp
    1> DESL.cpp
    1> DEST.cpp
    1> DEUT.cpp
    1> DLAY.cpp
    1> DMG.cpp
    1> DMND.cpp
    1> DRAY.cpp
    1> DRIC.cpp
    1> DSTW.cpp
    1> Generating Code...
    1> Compiling...
    1> DTEC.cpp
    1> DUST.cpp
    1> DYST.cpp
    1> ELEC.cpp
    1> Element.cpp
    1> EMBR.cpp
    1> EMP.cpp
    1> ETRD.cpp
    1> EXOT.cpp
    1> FIGH.cpp
    1> FILT.cpp
    1> FIRE.cpp
    1> FIRW.cpp
    1> FOG.cpp
    1> FRAY.cpp
    1> FRME.cpp
    1> FRZW.cpp
    1> FRZZ.cpp
    1> FSEP.cpp
    1> FUSE.cpp
    1> Generating Code...
    1> Compiling...
    1> FWRK.cpp
    1> GAS.cpp
    1> GBMB.cpp
    1> GEL.cpp
    1> GLAS.cpp
    1> GLOW.cpp
    1> GOLD.cpp
    1> GOO.cpp
    1> GPMP.cpp
    1> GRAV.cpp
    1> GRVT.cpp
    1> GUNP.cpp
    1> H2.cpp
    1> HSWC.cpp
    1> ICEI.cpp
    1> IGNT.cpp
    1> INSL.cpp
    1> INST.cpp
    1> INVIS.cpp
    1> INWR.cpp
    1> Generating Code...
    1> Compiling...
    1> IRON.cpp
    1> ISOZ.cpp
    1> ISZS.cpp
    1> LAVA.cpp
    1> LCRY.cpp
    1> LIFE.cpp
    1> LIGH.cpp
    1> LNTG.cpp
    1> LO2.cpp
    1> LOLZ.cpp
    1> LOVE.cpp
    1> LRBD.cpp
    1> MERC.cpp
    1> METL.cpp
    1> MORT.cpp
    1> MWAX.cpp
    1> NBHL.cpp
    1> NBLE.cpp
    1> NEUT.cpp
    1> NICE.cpp
    1> Generating Code...
    1> Compiling...
    1> NITR.cpp
    1> NONE.cpp
    1> NSCN.cpp
    1> NTCT.cpp
    1> NWHL.cpp
    1> O2.cpp
    1> OIL.cpp
    1> PBCN.cpp
    1> PCLN.cpp
    1> PHOT.cpp
    1> PIPE.cpp
    1> PLEX.cpp
    1> PLNT.cpp
    1> PLSM.cpp
    1> PLUT.cpp
    1> PPIP.cpp
    1> PQRT.cpp
    1> PROT.cpp
    1> PRTI.cpp
    1> PRTO.cpp
    1> Generating Code...
    1> Compiling...
    1> PSCN.cpp
    1> PSNS.cpp
    1> PSTE.cpp
    1> PSTN.cpp
    1> PSTS.cpp
    1> PTCT.cpp
    1> PUMP.cpp
    1> PVOD.cpp
    1> QRTZ.cpp
    1> RBDM.cpp
    1> RIME.cpp
    1> RPEL.cpp
    1> SALT.cpp
    1> SAND.cpp
    1> SHLD1.cpp
    1> SHLD2.cpp
    1> SHLD3.cpp
    1> SHLD4.cpp
    1> SING.cpp
    1> SLTW.cpp
    1> Generating Code...
    1> Compiling...
    1> SMKE.cpp
    1> SNOW.cpp
    1> SOAP.cpp
    1> SPAWN.cpp
    1> SPAWN2.cpp
    1> SPNG.cpp
    1> SPRK.cpp
    1> STKM.cpp
    1> STKM2.cpp
    1> STNE.cpp
    1> STOR.cpp
    1> SWCH.cpp
    1> TESC.cpp
    1> THDR.cpp
    1> THRM.cpp
    1> TRON.cpp
    1> TSNS.cpp
    1> TTAN.cpp
    1> TUNG.cpp
    1> URAN.cpp
    1> Generating Code...
    1> Compiling...
    1> VIBR.cpp
    1> VINE.cpp
    1> VIRS.cpp
    1> VOID.cpp
    1> VRSG.cpp
    1> VRSS.cpp
    1> WARP.cpp
    1> WATR.cpp
    1> WAX.cpp
    1> WHOL.cpp
    1> WIFI.cpp
    1> WIRE.cpp
    1> WOOD.cpp
    1> WTRV.cpp
    1> YEST.cpp
    1> Gravity.cpp
    1> Particle.cpp
    1> SaveRenderer.cpp
    1> Sign.cpp
    1> AirTool.cpp
    1> Generating Code...
    1> Compiling...
    1> Cool.cpp
    1> Heat.cpp
    1> NGrv.cpp
    1> PGrv.cpp
    1> SimTool.cpp
    1> Vac.cpp
    1> Simulation.cpp
    1>src\simulation\Simulation.cpp(4034): error C3861: 'max': identifier not found
    1> SimulationData.cpp
    1> Task.cpp
    1> TaskWindow.cpp
    1> Update.cpp
    1> Generating Code...
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  • jacob1
    30th Oct 2015 Developer 0 Permalink
    What version of visual studio are you using?

    Also don't need to include the list of every file it compiled :P, just the error
  • AdrianBerger
    30th Oct 2015 Member 0 Permalink

    2010. Does it matter?

  • jacob1
    30th Oct 2015 Developer 0 Permalink
    @AdrianBerger (View Post)
    It does matter, the error is with std::max which is very non standard in visual studio and always seems to change between versions. I think they finally fixed it in the most recent version of Visual Studio, but 2010 still has a broken version.

    We have some code that is intended to make it work on older visual studio versions here: https://github.com/simtr/The-Powder-Toy/blob/master/src/Config.h#L156 I'm guessing it doesn't for whatever reason.

    I don't have VS 2010 anymore because that's really old. I think 2012 or 2013 should work, or maybe you could try fiddling with it.
  • AdrianBerger
    31st Oct 2015 Member 0 Permalink

    Thank you so much! Hopefully it will work. Thanks again.