fbc icon indicating copy to clipboard operation
fbc copied to clipboard

Could fbc achieve the same effect as making a share section in dll

Open elfsimulate opened this issue 2 years ago • 1 comments

In some scenarios,we need to share variables in a DLL on windows platform. with msvc compiler,we usually use the '#pragma data_seg("Shared")' option to create a share section in a dll. how could fbc achieve the same effect or is there a option or funciton in fbc ?

elfsimulate avatar Feb 02 '23 03:02 elfsimulate

As I know some linker keys need to be used. In the MSVC compiler, it looks like this (if memory serves):

link /section:.mydata,erw

I had a FreeBASIC project that was translated into an assembler listing and assembled by a linker from MSVC. True for a long time. But the experience is interesting.

verholom avatar Mar 01 '23 17:03 verholom