Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elfsimulate opened this issue Feb 2, 2023 · 1 comment
Open

Comments

@elfsimulate
Copy link

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 ?

@verholom
Copy link

verholom commented Mar 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants