Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Single PCH file for building the CodeBlocks_wx31_64.cbp
ollydbg:
About the visibility issue, for example:
- export cbSmartIndentPlugin class from the codeblocks.dll · asmwarrior/codeblocks_sf@8259e0c — https://github.com/asmwarrior/codeblocks_sf/commit/8259e0c0a4271aecda50b3a3f22c2b5ae96a8f9a
I think this change is needed either we enable PCH or disable PCH.
EDIT:
Since we build the codeblocks.dll as a shared library, and this dll include all the tinyxml source code, I add export decorations in tinyxml header files. (Which is suggested in this post: TinyXML / Discussion / Developer: TinyXML shared lib)
oBFusCATed:
1. Are PCH changes related to the visibility changes? Or in other words: can we fix the PCH without forcing visibility and vice versa?
2. Your branch: has the patch to re-enable the symbol browser and another patch to fix some hidpi issue.
3. The one which adds tinyxml DLLIMPORT to tinyxml. Use prefix marcos for different libs.
4. The major blocker for fixing the visibility was sqplus and its use in plugins. You're changing SqPlus to export stuff, so it is related.
5. You'll either have to setup a vm and test it there or ask someone to do this for you.
ollydbg:
--- Quote from: oBFusCATed on November 28, 2020, 04:15:34 pm ---1. Are PCH changes related to the visibility changes? Or in other words: can we fix the PCH without forcing visibility and vice versa?
--- End quote ---
NO, PCH issue and visibility issue are independent.
Basically, I think visibility is about to reduce the codeblocks.dll's size, currently when building this dll, we use a "-Wl,--export-all-symbols" option. I think we don't need to use this option, we can only export the symbols we needed, so we need add some "__declspec(dllexport)" decoration to the symbols.
PCH issue is mainly about the building speed, this has lower priority as I think.
ollydbg:
--- Quote from: oBFusCATed on November 28, 2020, 04:15:34 pm ---3. The one which adds tinyxml DLLIMPORT to tinyxml. Use prefix marcos for different libs.
--- End quote ---
you mean the name "DLLIMPORT" is not good, I may change a another name like "TINYXMLIMPORT"?
--- Quote ---4. The major blocker for fixing the visibility was sqplus and its use in plugins. You're changing SqPlus to export stuff, so it is related.
--- End quote ---
By default, the SqPlus export all the symbols, this is done by the linker option "-Wl,--export-all-symbols" when building the codeblocks.dll.
--- Code: --- src/include/scripting/include/squirrel.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/include/scripting/include/squirrel.h b/src/include/scripting/include/squirrel.h
index 9b1b6e9c9..7375b3860 100644
--- a/src/include/scripting/include/squirrel.h
+++ b/src/include/scripting/include/squirrel.h
@@ -36,8 +36,14 @@ extern "C" {
#endif
#ifndef SQUIRREL_API
-#define SQUIRREL_API extern
-#endif
+#ifdef _WIN32
+ // since we build the squirrel static library, and we need to export all the symbols
+ // the codeblocks.dll, we need to add the dllexport decoration
+ #define SQUIRREL_API extern __declspec(dllexport)
+#else
+ #define SQUIRREL_API extern
+#endif // _WIN32
+#endif // SQUIRREL_API
#if (defined(_WIN64) || defined(_LP64))
#ifndef _SQ64
--- End code ---
What I change here is that those SqPlus symbols are explicitly exported(since I remove the "-Wl,--export-all-symbols"), so the final exported symbols of SqPlus in codeblocks.dll are not changed after my changes.
stahta01:
WARNING: You must include the PCH file under windows directly!
You can not just include a header that includes the PCH file and expect it to work.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version