Page 1 of 2

POLINK: fatal error: Internal error: write_executable_image

Posted: Thu May 02, 2013 5:43 pm
by PremierePRO
I feel compile a code and I came out this error:

POLINK: fatal error: Internal error: write_executable_image

The code provides IncludeBinary with the. Wav files. Maybe it's a memory problem?

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 5:49 pm
by Fred
What size is your binary include ?

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 5:52 pm
by ts-soft
PremierePRO wrote:The code provides IncludeBinary with the. Wav files. Maybe it's a memory problem?
IncludeBinary in a DataSection? or in normal Code?

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 5:55 pm
by PremierePRO
The length is variable .... MAX 4 MBytes

I've added 27 files with a total of 15.2 MB .... and it appeared to me the error

All files that are 135MB .... I would include

PS. Maybe I would agree not to include in the executable, but load them when you need them!

But how do I get them to load from the directory where the program?

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 5:59 pm
by PremierePRO
ts-soft wrote:
PremierePRO wrote:The code provides IncludeBinary with the. Wav files. Maybe it's a memory problem?
IncludeBinary in a DataSection? or in normal Code?

Code: Select all

DataSection
  s001:IncludeBinary "....."
  s....
  s302:IncludeBinary "....."
EndDataSection
You mean this?

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 6:01 pm
by Fred
Your can try:

Code: Select all

Debug GetPathPart(ProgramFilename())
(not when running from the IDE as it will get the temp path as the exe is created here)

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 6:04 pm
by PremierePRO
Fred wrote:Your can try:

Code: Select all

Debug GetPathPart(ProgramFilename())
(not when running from the IDE as it will get the temp path as the exe is created here)
how?

It 'a row that I enter in the code?

:oops:

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Thu May 02, 2013 6:17 pm
by ts-soft

Code: Select all

LoadSound(1, GetPathPart(ProgramFilename()) + "s001.wav")

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Fri May 03, 2013 1:09 am
by PremierePRO
ts-soft wrote:

Code: Select all

LoadSound(1, GetPathPart(ProgramFilename()) + "s001.wav")
In reference to what? To upload files from the folder of the software?

I have to code

Code: Select all

InitSound()
UseOGGSoundDecoder()

Enumeration
  #Win
  #Text_
  #Btn_001
  #Btn_002
  #Btn_003
  #Btn_004
  #Btn_005
EndEnumeration

DataSection 
  s001: IncludeBinary "any.wav"
  s002: IncludeBinary "any1.wav"
  s003: IncludeBinary "any.wav"
EndDataSection

CatchSound(001, ?s001)
CatchSound(002, ?s002)
CatchSound(003, ?s003)

If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
  ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
  ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
  
  Repeat 
    EventID = WaitWindowEvent()  
    Select EventID
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Btn_001 : PlaySound(001)
          Case #Btn_002 : PlaySound(002)
          Case #Btn_003 : PlaySound(003)
          Case #Btn_004 : End
          Case #Btn_005 : StopSound(-1)
        EndSelect
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Fri May 03, 2013 2:03 am
by idle
you need to tell it how much to read

Code: Select all

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)


Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Fri May 03, 2013 10:16 am
by PremierePRO
idle wrote:you need to tell it how much to read

Code: Select all

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)

I do not understand ? :oops:

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Fri May 03, 2013 10:36 pm
by idle
PremierePRO wrote:
idle wrote:you need to tell it how much to read

Code: Select all

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)

I do not understand ? :oops:
Did you replace try to replace it in your code ?

When you use the function catch sound, you need to tell it the length to read
The "?" gets the address of a label in your exe

CatchSound(1, ?s001,?s002-?s001)

sound 1 = Read from Address s001, length = address of label S002 - address of S001, The length of the file

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Sat May 04, 2013 1:23 am
by PremierePRO
idle wrote:
PremierePRO wrote:
idle wrote:you need to tell it how much to read

Code: Select all

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)

I do not understand ? :oops:
Did you replace try to replace it in your code ?

When you use the function catch sound, you need to tell it the length to read
The "?" gets the address of a label in your exe

CatchSound(1, ?s001,?s002-?s001)

sound 1 = Read from Address s001, length = address of label S002 - address of S001, The length of the file
Help me understand how to enter this code?

Code: Select all

InitSound()
UseOGGSoundDecoder()

Enumeration
  #Win
  #Text_
  #Btn_001
  #Btn_002
  #Btn_003
  #Btn_004
  #Btn_005
EndEnumeration

DataSection 
  s001: IncludeBinary "any.wav"
  s002: IncludeBinary "any1.wav"
  s003: IncludeBinary "any.wav"
EndDataSection

CatchSound(001, ?s001)
CatchSound(002, ?s002)
CatchSound(003, ?s003)

If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
  ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
  ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
  
  Repeat 
    EventID = WaitWindowEvent()  
    Select EventID
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Btn_001 : PlaySound(001)
          Case #Btn_002 : PlaySound(002)
          Case #Btn_003 : PlaySound(003)
          Case #Btn_004 : End
          Case #Btn_005 : StopSound(-1)
        EndSelect
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Sat May 04, 2013 10:40 pm
by idle

Code: Select all

InitSound()
UseOGGSoundDecoder()

Enumeration
  #Win
  #Text_
  #Btn_001
  #Btn_002
  #Btn_003
  #Btn_004
  #Btn_005
EndEnumeration

DataSection 
  s001: IncludeBinary "any.wav"
  s002: IncludeBinary "any1.wav"
  s003: IncludeBinary "any.wav"
EndDataSection

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)


If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
  ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
  ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
  
  Repeat 
    EventID = WaitWindowEvent()  
    Select EventID
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Btn_001 : PlaySound(1)
          Case #Btn_002 : PlaySound(2)
          Case #Btn_003 : PlaySound(3)
          Case #Btn_004 : End
          Case #Btn_005 : StopSound(-1)
        EndSelect
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Re: POLINK: fatal error: Internal error: write_executable_im

Posted: Sat May 04, 2013 11:30 pm
by PremierePRO
idle wrote:

Code: Select all

InitSound()
UseOGGSoundDecoder()

Enumeration
  #Win
  #Text_
  #Btn_001
  #Btn_002
  #Btn_003
  #Btn_004
  #Btn_005
EndEnumeration

DataSection 
  s001: IncludeBinary "any.wav"
  s002: IncludeBinary "any1.wav"
  s003: IncludeBinary "any.wav"
EndDataSection

CatchSound(1, ?s001,?s002-?s001)
CatchSound(2, ?s002,?s003-?s002)
CatchSound(3, ?s003)


If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
  ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
  ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
  ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
  
  Repeat 
    EventID = WaitWindowEvent()  
    Select EventID
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Btn_001 : PlaySound(1)
          Case #Btn_002 : PlaySound(2)
          Case #Btn_003 : PlaySound(3)
          Case #Btn_004 : End
          Case #Btn_005 : StopSound(-1)
        EndSelect
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf
Thank you.

But it gives me error if I click on the button 3!