-
November 19th, 2018, 10:40 AM
#16
Re: Dynamic Library: Do you need to export variables of a class?
Originally Posted by 2kaud
and why the dll interfaces need to be 'C' and not C++!
Well if I'm compiling the project myself, I won't probably have any problems but if others need to compile it in other operating systems too , from what i read from your links i will have a problem. If i program every dll in C i won't have problems with the compilers right?
-
November 19th, 2018, 11:11 AM
#17
Re: Dynamic Library: Do you need to export variables of a class?
If the .exe(s) and the .dll(s) are compiled with exactly the same version of the compiler/stl etc then there shouldn't be a problem. If an .exe or another .dll is compiled with say version w.x.y and this .dll is compiled with version w.x.z then yes, you could well have a problem. If you are distributing .dll(s) as upgrades to big projects you need to have the .dll(s) interfaces as 'C' so that it doesn't matter if the version of the compiler/stl that was used to compile the .dll is not the same as that used to compile the .exe(s).
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
November 19th, 2018, 11:40 AM
#18
Re: Dynamic Library: Do you need to export variables of a class?
Now I know everything I need to know! You really helped me all of you. I never expected that dlls would have to much you need to know. A last question. Does the same things are applied to linux shared libraries? Should I search more about it?
-
November 19th, 2018, 12:51 PM
#19
Re: Dynamic Library: Do you need to export variables of a class?
Sorry - I can't help you with Linux as I only use Windows/MSVS.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|