POLINK: fatal error: Internal error: write_executable_image

Just starting out? Need help? Post your questions and find answers here.
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

POLINK: fatal error: Internal error: write_executable_image

Post 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?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: POLINK: fatal error: Internal error: write_executable_im

Post by Fred »

What size is your binary include ?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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?
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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)
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: POLINK: fatal error: Internal error: write_executable_im

Post by ts-soft »

Code: Select all

LoadSound(1, GetPathPart(ProgramFilename()) + "s001.wav")
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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)

Windows 11, Manjaro, Raspberry Pi OS
Image
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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:
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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
Windows 11, Manjaro, Raspberry Pi OS
Image
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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
Windows 11, Manjaro, Raspberry Pi OS
Image
PremierePRO
User
User
Posts: 28
Joined: Tue Apr 16, 2013 10:31 am

Re: POLINK: fatal error: Internal error: write_executable_im

Post 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!
Post Reply