Incbin when debug is off only

BlitzMax Forums/BlitzMax Programming/Incbin when debug is off only

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This is how I do it (which is pretty much what you're already doing). The only drawback is that you can't conditionally include/exclude .bmx source at compile time, so you need to comment out the Include line. Although it isn't as elegant as a preset compiler directive, it works fine:
Global Debug:Byte = true 'or False
Global binPath:string = ""

Include "incbinDeclarations.bmx" 'comment this out if running in debug mode.

If Debug
  binPath = ""
Else
  binPath = "Incbin::"  
EndIf

LoadGraphics()

Function LoadGraphics()
  img = LoadImage(binpath+"image.png")
End Function