does anyone use the Linker options file ?

Everything else that doesn't fall into one of the other PB categories.
jack
Addict
Addict
Posts: 1336
Joined: Fri Apr 25, 2003 11:10 pm

does anyone use the Linker options file ?

Post by jack »

in testing my code that [ab]uses the stack I needed to increase the stack size, seems to me it would be simpler to have a stack size option rather than to have the option in a file, just curious if people use the linker options
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: does anyone use the Linker options file ?

Post by STARGÅTE »

I use the Linker option to increase the stack size as well.
To use a file for this is fine for me.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
idle
Always Here
Always Here
Posts: 5049
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: does anyone use the Linker options file ?

Post by idle »

An examples would be good.
jack
Addict
Addict
Posts: 1336
Joined: Fri Apr 25, 2003 11:10 pm

Re: does anyone use the Linker options file ?

Post by jack »

hello idle, not sure what you meant, but here's my file to set the stack size
linker_options.txt
/STACK:2097152
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: does anyone use the Linker options file ?

Post by skywalk »

From the interwebs:
msvc--> /STACK:256000000
gcc --> -Wl,--stack=256000000
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
idle
Always Here
Always Here
Posts: 5049
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: does anyone use the Linker options file ?

Post by idle »

Thanks it's good to provide examples for other people. I'm not sure you need a file though

on on linux you can use

Code: Select all

ImportC "-Wl,--stack=256000000" : Endimport   
n windows with pb 6 at least you can use

Code: Select all

ImportC "/STACK:2097152" : EndImport
jack
Addict
Addict
Posts: 1336
Joined: Fri Apr 25, 2003 11:10 pm

Re: does anyone use the Linker options file ?

Post by jack »

thanks for the tip idle :)
User avatar
idle
Always Here
Always Here
Posts: 5049
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: does anyone use the Linker options file ?

Post by idle »

jack wrote: Thu Jun 23, 2022 11:53 pm thanks for the tip idle :)
I'm not sure how long that has worked on windows, so I learned something new! :D
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: does anyone use the Linker options file ?

Post by skywalk »

Very interesting!
I wound up making global def's for very big structures cause of stack limit.
I didn't think to change the stack size. :oops:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: does anyone use the Linker options file ?

Post by Caronte3D »

The change of stack size is for EXE only or works also on DLL compilation?
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: does anyone use the Linker options file ?

Post by STARGÅTE »

I tried it, but it doesn't work. The stack size is not saved in the DLL, its defined by the parent application which uses the DLL.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: does anyone use the Linker options file ?

Post by Caronte3D »

Thanks!
I was read that on the Microsoft info and supposse was the same on PB.
Post Reply