Author Topic: Squirrel 3.1 and new bindings  (Read 22838 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Squirrel 3.1 and new bindings
« on: April 16, 2021, 09:09:32 pm »
Here is a branch: https://github.com/obfuscated/codeblocks_sf/tree/scripting/update_to_31

I've spend the last months working on this, because I need it for my debugger-test-suite I want to make.
This branch updates Squirrel to the latest released version - 3.1-stable.
It removes SqPlus, because it is no longer maintained and it is buggy (this was my main motivation to do the work).
I've applied some patches to the interpreter - comparing wxStrings with == now works.
Unfortunately the Squirrel devs don't intend to review my patch, nor do they plan to give feedback on it and they/he have repeatedly mentioned that this feature won't go in to the upstream, because it can slow down the language, but they don't have a test suite and so their claims are mostly predictive and not based on actual facts. Up to now I've not seen any problems with it.
I've added tests for most of the exposed APIs. This branch passes more tests then master/trunk.

I've not tested on Windows. Linux and macOS build and work fine as far as I can test.

If you need to know how the new binding works read the comments in sc_utils.h and if something is unclear don't hesitate to ask.
I plan to fix some of the remaining TODOs (you can search them with "FIXME (squirrel)") and then push this monstrosity.

Any feedback is welcome, especially on Windows.

Note: I've not tested every single wizard, so if you have favourite wizard give it a try and tell me if something is broken, I'm sure there are such cases!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #1 on: April 17, 2021, 08:18:11 am »
Code
From 5c8abf12484cabd79be5b2603b3043a272172fe6 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Sat, 17 Apr 2021 00:52:52 -0400
Subject: Win fix

---
 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 4844317d5..a22e73081 100644
--- a/src/include/scripting/include/squirrel.h
+++ b/src/include/scripting/include/squirrel.h
@@ -27,8 +27,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 __declspec(dllexport)
+#else
+    #define SQUIRREL_API extern
+#endif // _WIN32
+#endif // SQUIRREL_API
 
 #if (defined(_WIN64) || defined(_LP64))
 #ifndef _SQ64
--
2.31.1.windows.1
Code
From 5e68a70734e0da0495cf57cbe617071452c0c3df Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Sat, 17 Apr 2021 02:05:09 -0400
Subject: Add SQUIRREL_API to fix win build error

---
 src/include/scripting/bindings/sc_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/scripting/bindings/sc_utils.h b/src/include/scripting/bindings/sc_utils.h
index 03eaf944a..838487109 100644
--- a/src/include/scripting/bindings/sc_utils.h
+++ b/src/include/scripting/bindings/sc_utils.h
@@ -183,7 +183,7 @@
 namespace ScriptBindings
 {
 
-void PrintStack(HSQUIRRELVM vm, const char *title, SQInteger oldTop = -1);
+SQUIRREL_API void PrintStack(HSQUIRRELVM vm, const char *title, SQInteger oldTop = -1);
 wxString ExtractLastSquirrelError(HSQUIRRELVM vm, bool canBeEmpty);
 
 struct PreserveTop
--
2.31.1.windows.1

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #2 on: April 17, 2021, 05:48:35 pm »
Are you able to run the tests?
Steps:
1. Show the script console
2. Load the src/scripts/tests/script_test_plugin.script
3. Plugins -> Test scripting -> Test wx or Test sdk

Post the results here.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #3 on: April 17, 2021, 10:15:15 pm »
Edit3: "Test wx" seems to do nothing that I can see other than a box pops up for me to click on.

I had to manually create the folder "C:\Users\stahta01\AppData\Local\Temp\sdk_tests" before the SDK tests did much.
It crash a little later; going to have to try again to see if it still crashes.

Edit2: It did not crash the second time; but, the first time I was building Code::Blocks main project and I think that might be a partial reason it crashed.

I have neither a printer setup and I have no debugger setup inside Code::Blocks.

Code
Script plugin registered: Scripting_TestPlugin
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ProjectManager::SetProject took: 0.085 seconds.
Current target 'Debug_New' doesn't have valid compiler!
ProjectManager::SetProject took: 0.119 seconds.
ProjectManager::SetProject took: 0.094 seconds.
ProjectManager::SetProject took: 0.093 seconds.
Opening C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject2.cbp
Done.
ProjectManager::CloseAllProjects took: 0.179 seconds.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
cbEditor::AutoComplete() is obsolete.
Use AutoComplete(cbEditor &ed) from the Abbreviations plugin instead.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ProjectManager::SetProject took: 0.086 seconds.
Current target 'Debug_New' doesn't have valid compiler!
ProjectManager::SetProject took: 0.095 seconds.
ProjectManager::SetProject took: 0.095 seconds.
ProjectManager::SetProject took: 0.112 seconds.
Opening C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject2.cbp
Done.
ProjectManager::CloseAllProjects took: 0.181 seconds.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
cbEditor::AutoComplete() is obsolete.
Use AutoComplete(cbEditor &ed) from the Abbreviations plugin instead.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.
ToDoList: Warning: No to-do types or comment symbols selected to search for, nothing to do.

Tim S.
« Last Edit: April 17, 2021, 10:26:05 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Squirrel 3.1 and new bindings
« Reply #4 on: April 18, 2021, 12:49:06 am »
Had to apply the patches of stahta01 to be able to compile

SDK test:
Code
Global executed tests: 24
Global passed tests:   24
Global failed tests:   0

wx test
Code
Global executed tests: 138
Global passed tests:   126
Global failed tests:   13

The failed tests are:
Code
[ERROR] Test: cmp string          FAILED (got false needed true)
[ERROR] Test: cmp string2         FAILED (got false needed true)
[ERROR] Test: cmp string not      FAILED (got false needed true)
[ERROR] Test: cmp string not2     FAILED (got false needed true)

[ERROR] Test: InsertDir value     FAILED (got "\newdir\share\codeblocks\" needed "newdir\\share\codeblocks\ ")
[ERROR] Test: PrependDir value    FAILED (got "\newdir\share\codeblocks\" needed "newdir\\share\codeblocks\ ")
The other failed tests are related to path handling or volume, that failed also in the old implementation...

the failed tests for paths seem to be some error with the "::wxFILE_SEP_PATH" constant

@stahta01: the output of the tests is in the scripting console
« Last Edit: April 18, 2021, 12:52:41 am by BlueHazzard »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #5 on: April 18, 2021, 01:07:48 am »
Some OS related test failures are expected. The string comparison failures aren't. :shrug:

p.s. I hate PCHs, such a stupid idea.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Squirrel 3.1 and new bindings
« Reply #6 on: April 18, 2021, 04:18:41 am »
I use Tim's patches, thanks Tim!

Are you able to run the tests?
Steps:
1. Show the script console
2. Load the src/scripts/tests/script_test_plugin.script

Here is my result:
Code
Welcome to the script console!
Plugin instance: (instance : 0x0000000005E8B190)
======= Test Test environment BEGINN =======
 this is intended to fail:
[ERROR] Test: test_string...................FAILED
[ERROR] got:    "hallo"
[ERROR] needed: "nope "

Executed tests: 1
passed tests:   0
failed tests:   1
======= Test Test environment END =======
======= Test wx String BEGINN =======
Test: tostring......................PASSED
Test: constructor(SQchar)...........PASSED
Test: cmp...........................PASSED
Test: cmp not.......................PASSED
Test: cmp string....................PASSED
Test: cmp string2...................PASSED
Test: cmp string not................PASSED
Test: cmp string not2...............PASSED
Test: Compare.......................PASSED
Test: Compare lt....................PASSED
Test: Compare gt....................PASSED
Test: Compare lt string.............PASSED
Test: Compare gt string.............PASSED
Test: _add..........................PASSED
Test: _add wxString+string..........PASSED
Test: _add string+wxString..........PASSED
Test: _add wxString+int.............PASSED
Test: _add wxString+float...........PASSED
Test: _cloned.......................PASSED
Test: IsEmpty.......................PASSED
Test: IsEmpty.......................PASSED
Test: Length........................PASSED
Test: length........................PASSED
Test: len...........................PASSED
Test: size..........................PASSED
Test: Lower.........................PASSED
Test: LowerCase.....................PASSED
Test: MakeLower.....................PASSED
Test: Upper.........................PASSED
Test: UpperCase.....................PASSED
Test: MakeUpper.....................PASSED
Test: Mid...........................PASSED
Test: Remove........................PASSED
Test: RemoveLast....................PASSED
Test: Replace ret...................PASSED
Test: Replace value.................PASSED
Test: AfterFirst....................PASSED
Test: AfterFirst str................PASSED
Test: AfterLast.....................PASSED
Test: AfterLast str.................PASSED
Test: BeforeFirst...................PASSED
Test: BeforeFirst str...............PASSED
Test: BeforeLast....................PASSED
Test: BeforeLast str................PASSED
Test: Right.........................PASSED
Test: Left..........................PASSED
Test: Matches.......................PASSED
Test: Find..........................PASSED
Test: Find not......................PASSED
Test: AddChar 'D'...................PASSED
Test: GetChar 0.....................PASSED
Test: Assignment 0..................PASSED
Test: Assignment 1..................PASSED
Test: Set 0.........................PASSED
Test: Set 1.........................PASSED
Test: ConcatNull....................PASSED
Test: wxString_ToLong good..........PASSED
Test: wxString_ToLong bad...........PASSED

Executed tests: 56
passed tests:   58
failed tests:   0
======= Test wx String END =======
======= Test wx String unicode BEGINN =======
[ERROR] Test: This implementation doesn't support UNICODE...MADE-FAILED
[ERROR] not implemented, as you can see on the wrong test string (it has to show Cyrillic  and ?Japanese? symbols

Executed tests: 0
passed tests:   0
failed tests:   1
======= Test wx String unicode END =======
======= Test wx Color BEGINN =======
Test: Set...........................PASSED
Test: tostring......................PASSED
Test: _cloned.......................PASSED
Test: Red...........................PASSED
Test: Green.........................PASSED
Test: Blue..........................PASSED
Test: IsOK..........................PASSED

Executed tests: 7
passed tests:   7
failed tests:   0
======= Test wx Color END  =======
======= Test wxArrayString BEGINN =======
Test: constructor...................PASSED
Test: Add wxString..................PASSED
Test: GetCount......................PASSED
Test: Index("String1")..............PASSED
Test: Index("String10").............PASSED
Test: Index("string1",true,false)...PASSED
Test: Index("string1",false,false)..PASSED
Test: Index("string2",false,false)..PASSED
Test: Index("string2",false,true)...PASSED
Test: Item..........................PASSED
Test: _cloned.......................PASSED
itemValue='String2 modified'; newValue='String2 modified'
Test: Item after modify.............PASSED
Test: SetItem.......................PASSED
Test: SetItem.......................PASSED
Test: SetItem old ref...............PASSED
Test: Clear.........................PASSED

Executed tests: 15
passed tests:   16
failed tests:   0
======= Test wxArrayString END  =======
======= Test wxFileName BEGINN =======
Test: constructor...................PASSED
Use path: \share\codeblocks\
Test: tostring......................PASSED
Test: _cloned.......................PASSED
Test: Assign........................PASSED
Test: GetDirCount...................PASSED
Test: GetDirs.......................PASSED
Test: Clear.........................PASSED
Test: AssignDir.....................PASSED
Test: AssignCwd = D:\code\cbsource\script31\src\output31_64\
Test: AssignCwd ????................PASSED
Test: GetCwd = D:\code\cbsource\script31\src\output31_64
Test: GetCwd ????...................PASSED
Test: AssignHomeDir = C:\Users\Administrator\
Test: AssignHomeDir ????............PASSED
Test: GetExt........................PASSED
Test: GetFullName...................PASSED
Test: GetFullPath...................PASSED
Test: GetLongPath = share\CodeBlocks\tips.txt
Test: GetLongPath ????..............PASSED
Test: GetName.......................PASSED
Test: GetPath = \share\codeblocks
Test: GetPath ????..................PASSED
Test: GetShortPath = \share\codeblocks\tips.txt
Test: GetShortPath ????.............PASSED
Test: GetVolume = 
Test: GetVolume ????................PASSED
Test: HasExt........................PASSED
Test: HasExt not (after ClearExt)...PASSED
Test: HasName.......................PASSED
[ERROR] Test: HasVolume.....................FAILED
[ERROR] got:    false
[ERROR] needed: true
Test: IsAbsolute....................PASSED
Test: IsOk..........................PASSED
Test: IsRelative....................PASSED
Test: IsDir.........................PASSED
Test: GetFullName...................PASSED
Test: GetFullPath...................PASSED
Test: InsertDir.....................PASSED
[ERROR] Test: InsertDir value...............FAILED
[ERROR] got:    "\newdir\share\codeblocks\"
[ERROR] needed: "newdir\\share\codeblocks\ "
Test: PrependDir....................PASSED
[ERROR] Test: PrependDir value..............FAILED
[ERROR] got:    "\newdir\share\codeblocks\"
[ERROR] needed: "newdir\\share\codeblocks\ "
Test: RemoveDir.....................PASSED
Test: AppendDir.....................PASSED
Test: AppendDir value...............PASSED
Test: MakeAbsolute..................PASSED
[ERROR] Test: MakeAbsolute value............FAILED
[ERROR] got:    "C:\share\codeblocks\tips.txt"
[ERROR] needed: "C:\Users\Administrator\\share\codeblocks\tips.txt "
Test: MakeRelativeTo................PASSED
[ERROR] Test: MakeRelativeTo value..........FAILED
[ERROR] got:    "..\..\share\codeblocks\tips.txt"
[ERROR] needed: "\share\codeblocks\tips.txt "
Test: Normalize.....................PASSED
[ERROR] Test: Normalize value...............FAILED
[ERROR] got:    "C:\share\codeblocks\tips.txt"
[ERROR] needed: "C:\Users\Administrator\\share\codeblocks\tips.txt "
Test: SameAs equal..................PASSED
Test: SameAs not equal..............PASSED
Test: SetExt........................PASSED
Test: SetEmptyExt...................PASSED
Test: SetEmptyExt has...............PASSED
Test: SetFullName...................PASSED
Test: SetName.......................PASSED
[ERROR] Test: SetVolume.....................FAILED
[ERROR] got:    "\\afterName\share\codeblocks\afterName.my"
[ERROR] needed: "\share\codeblocks\afterName.my "

Executed tests: 42
passed tests:   43
failed tests:   7
======= Test wxFileName END  =======
======= Test wxPoint BEGINN =======
Test: compare gt....................PASSED
Test: compare gt....................PASSED
Test: compare lt....................PASSED
Test: compare lt....................PASSED
Test: Cmp...........................PASSED
Test: Cmp not.......................PASSED
Test: _tostring.....................PASSED
Test: _cloned.......................PASSED

Executed tests: 8
passed tests:   8
failed tests:   0
======= Test wxPoint END  =======
======= Test wxSize BEGINN =======
Test: _tostring.....................PASSED
Test: _cloned.......................PASSED
Test: GetWidth......................PASSED
Test: GetHeight.....................PASSED
Test: SetWidth......................PASSED
Test: SetHeight.....................PASSED

Executed tests: 6
passed tests:   6
failed tests:   0
======= Test wxSize END  =======

Global executed tests: 146
Global passed tests:   138
Global failed tests:   9
Script loaded successfully


Quote
3. Plugins -> Test scripting -> Test wx or Test sdk

I think the "Test wx" result is the same as the step 2.

Here is the Test sdk result: when after testing, there is a warning message box:
" Couldn't save project C:\Users\ADMINI~1\AppData\Local\Temp\sdk_tests\NewProjects.cbp (Maybe the file is write-protected?)"

The log contents are too big to paste here, so I upload as attachment.

BTW: I'm using the portable mode to start the C::B,
Code
start cblauncher.exe --debug-log --no-dde --no-check-associations --multiple-instance --no-splash-screen
but it looks like it still use some global folders.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Squirrel 3.1 and new bindings
« Reply #7 on: April 18, 2021, 05:28:49 pm »
I have run the wrong tests...

For wx i get the same results as ollydbg...

for sdk i got some write permission errors like ollydbg and at the end some crash:
Code
error:
error: AN ERROR HAS OCCURED [the index 'SetModified' does not exist]
error:
error: CALLSTACK
error: *FUNCTION [test_classes()] C:\Users\XXXXX\codeblocks_git_obfuscated\src\scripts\tests/sdk_test.script line [1353]
error: *FUNCTION [Run()] C:\Users\XXXXX\Documents\src\scripts\tests/sdk_test.script line [14]
error: *FUNCTION [StartSDKTest()] C:\Users\XXXXX\codeblocks_git_obfuscated\src\scripts\tests\script_test_plugin.script line [90]
error: *FUNCTION [OnMenuClicked()] C:\Users\XXXXX\codeblocks_git_obfuscated\src\scripts\tests\script_test_plugin.script line [62]
error:
error: LOCALS
error: [editor1Filename] INSTANCE
error: [editor0Filename] INSTANCE
error: [editor1] NULL
error: [editor0] INSTANCE
error: [editorMgr] INSTANCE
error: [tempFolder] INSTANCE
error: [this] INSTANCE
error: [this] INSTANCE
error: [sdk] INSTANCE
error: [this] INSTANCE
error: [index] 1
error: [this] INSTANCE

exactly as ollydbg ...

sry about the noise...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #8 on: April 18, 2021, 05:43:17 pm »
The tests are not really windows proofed. Either I have to find a windows machine or someone else to volunteer to try and fix them.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #9 on: April 24, 2021, 01:26:34 am »
I've applied a modified version of the stahta01, please let me know if they work.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Squirrel 3.1 and new bindings
« Reply #10 on: April 24, 2021, 01:49:30 am »
I've applied a modified version of the stahta01, please let me know if they work.

I got such build error:

Code
-------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler)---------------

[100.0%] Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h
[100.0%] g++.exe -shared  -Wl,--out-implib=devel31_64\libcodeblocks.a -Wl,--dll -Ld:\code\wxWidgets-3.1.5\lib\gcc_dll -Ldevel31_64 .objs31_64\sdk\configmanager-revision.o .objs31_64\sdk\annoyingdialog.o .objs31_64\sdk\autodetectcompilers.o .objs31_64\sdk\base64.o .objs31_64\sdk\blockallocated.o .objs31_64\sdk\cbart_provider.o .objs31_64\sdk\cbauibook.o .objs31_64\sdk\cbcolourmanager.o .objs31_64\sdk\cbdebugger_interfaces.o .objs31_64\sdk\cbeditor.o .objs31_64\sdk\cbeditorprintout.o .objs31_64\sdk\cbexception.o .objs31_64\sdk\cbplugin.o .objs31_64\sdk\cbproject.o .objs31_64\sdk\cbstatusbar.o .objs31_64\sdk\cbstyledtextctrl.o .objs31_64\sdk\cbthreadpool.o .objs31_64\sdk\cbtreectrl.o .objs31_64\sdk\cbworkspace.o .objs31_64\sdk\ccmanager.o .objs31_64\sdk\compileoptionsbase.o .objs31_64\sdk\compiler.o .objs31_64\sdk\compilercommandgenerator.o .objs31_64\sdk\compilerfactory.o .objs31_64\sdk\compileroptions.o .objs31_64\sdk\compiletargetbase.o .objs31_64\sdk\configmanager.o .objs31_64\sdk\configurationpanel.o .objs31_64\sdk\configuretoolsdlg.o .objs31_64\sdk\confirmreplacedlg.o .objs31_64\sdk\crc32.o .objs31_64\sdk\debuggermanager.o .objs31_64\sdk\editarrayfiledlg.o .objs31_64\sdk\editarrayorderdlg.o .objs31_64\sdk\editarraystringdlg.o .objs31_64\sdk\editor_hooks.o .objs31_64\sdk\editor_utils.o .objs31_64\sdk\editorbase.o .objs31_64\sdk\editorcolourset.o .objs31_64\sdk\editorlexerloader.o .objs31_64\sdk\editormanager.o .objs31_64\sdk\editpairdlg.o .objs31_64\sdk\editpathdlg.o .objs31_64\sdk\edittooldlg.o .objs31_64\sdk\encodingdetector.o .objs31_64\sdk\externaldepsdlg.o .objs31_64\sdk\filefilters.o .objs31_64\sdk\filegroupsandmasks.o .objs31_64\sdk\filemanager.o .objs31_64\sdk\findreplacedlg.o .objs31_64\sdk\genericmultilinenotesdlg.o .objs31_64\sdk\globals.o .objs31_64\sdk\importers_globals.o .objs31_64\sdk\incremental_select_helper.o .objs31_64\sdk\infowindow.o .objs31_64\sdk\loggers.o .objs31_64\sdk\logmanager.o .objs31_64\sdk\macrosmanager.o .objs31_64\sdk\manager.o .objs31_64\sdk\menuitemsmanager.o .objs31_64\sdk\mozilla_chardet\src\CharDistribution.o .objs31_64\sdk\mozilla_chardet\src\JpCntx.o .objs31_64\sdk\mozilla_chardet\src\LangBulgarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangCyrillicModel.o .objs31_64\sdk\mozilla_chardet\src\LangGreekModel.o .objs31_64\sdk\mozilla_chardet\src\LangHebrewModel.o .objs31_64\sdk\mozilla_chardet\src\LangHungarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangThaiModel.o .objs31_64\sdk\mozilla_chardet\src\nsBig5Prober.o .objs31_64\sdk\mozilla_chardet\src\nsCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscCharsetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscSM.o .objs31_64\sdk\mozilla_chardet\src\nsEUCJPProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCKRProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCTWProber.o .objs31_64\sdk\mozilla_chardet\src\nsGB2312Prober.o .objs31_64\sdk\mozilla_chardet\src\nsHebrewProber.o .objs31_64\sdk\mozilla_chardet\src\nsLatin1Prober.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSSM.o .objs31_64\sdk\mozilla_chardet\src\nsSBCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsSBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsSJISProber.o .objs31_64\sdk\mozilla_chardet\src\nsUniversalDetector.o .objs31_64\sdk\mozilla_chardet\src\nsUTF8Prober.o .objs31_64\sdk\multiselectdlg.o .objs31_64\sdk\newfromtemplatedlg.o .objs31_64\sdk\personalitymanager.o .objs31_64\sdk\pipedprocess.o .objs31_64\sdk\pluginmanager.o .objs31_64\sdk\pluginsconfigurationdlg.o .objs31_64\sdk\printing_types.o .objs31_64\sdk\projectbuildtarget.o .objs31_64\sdk\projectfile.o .objs31_64\sdk\projectfileoptionsdlg.o .objs31_64\sdk\projectlayoutloader.o .objs31_64\sdk\projectloader.o .objs31_64\sdk\projectloader_hooks.o .objs31_64\sdk\projectmanager.o .objs31_64\sdk\projectsfilemasksdlg.o .objs31_64\sdk\projecttemplateloader.o .objs31_64\sdk\scripting\bindings\sc_consts.o .objs31_64\sdk\scripting\bindings\sc_globals.o .objs31_64\sdk\scripting\bindings\sc_io.o .objs31_64\sdk\scripting\bindings\sc_plugin.o .objs31_64\sdk\scripting\bindings\sc_progress.o .objs31_64\sdk\scripting\bindings\sc_util_dialogs.o .objs31_64\sdk\scripting\bindings\sc_utils.o .objs31_64\sdk\scripting\bindings\sc_wxtypes.o .objs31_64\sdk\scripting\bindings\scriptbindings.o .objs31_64\sdk\scriptingmanager.o .objs31_64\sdk\scriptsecuritywarningdlg.o .objs31_64\sdk\scrollingdialog.o .objs31_64\sdk\sdk_events.o .objs31_64\sdk\searchresultslog.o .objs31_64\sdk\selecttargetdlg.o .objs31_64\sdk\templatemanager.o .objs31_64\sdk\tinywxuni.o .objs31_64\sdk\toolsmanager.o .objs31_64\sdk\uservarmanager.o .objs31_64\sdk\workspaceloader.o .objs31_64\sdk\xtra_res.o  -o devel31_64\codeblocks.dll -Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined  -lshfolder -ltxml -lwxscintilla_cb -lsquirrel -lgdi32 -lwxmsw31u
devel31_64/libsquirrel.a(sqstdaux.o): In function `sqstd_printcallstack':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:8: undefined reference to `__imp_sq_geterrorfunc'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:18: undefined reference to `__imp_sq_stackinfos'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:32: undefined reference to `__imp_sq_getlocal'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:35: undefined reference to `__imp_sq_gettype'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:41: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:45: undefined reference to `__imp_sq_getfloat'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:52: undefined reference to `__imp_sq_getstring'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:87: undefined reference to `__imp_sq_getbool'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:93: undefined reference to `__imp_sq_pop'
devel31_64/libsquirrel.a(sqstdaux.o): In function `_sqstd_aux_printerror':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:101: undefined reference to `__imp_sq_geterrorfunc'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:104: undefined reference to `__imp_sq_gettop'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:105: undefined reference to `__imp_sq_getstring'
devel31_64/libsquirrel.a(sqstdaux.o): In function `_sqstd_compiler_error(SQVM*, char const*, char const*, long long, long long)':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:119: undefined reference to `__imp_sq_geterrorfunc'
devel31_64/libsquirrel.a(sqstdaux.o): In function `sqstd_seterrorhandlers':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:127: undefined reference to `__imp_sq_setcompilererrorhandler'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:128: undefined reference to `__imp_sq_newclosure'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:129: undefined reference to `__imp_sq_seterrorhandler'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_resize':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:27: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:29: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_swap4':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_swap2':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__set':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:72: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:73: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:75: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:77: undefined reference to `__imp_sq_push'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__get':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:85: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:87: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:88: undefined reference to `__imp_sq_pushinteger'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__nexti':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:95: undefined reference to `__imp_sq_gettype'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:96: undefined reference to `__imp_sq_pushinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:100: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:102: undefined reference to `__imp_sq_pushinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:105: undefined reference to `__imp_sq_pushnull'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:108: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__typeof':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:113: undefined reference to `__imp_sq_pushstring'
Process terminated with status 1 (0 minute(s), 49 second(s))


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #11 on: April 24, 2021, 04:47:08 am »
I've applied a modified version of the stahta01, please let me know if they work.

I got such build error:

Code
-------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler)---------------

[100.0%] Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h
[100.0%] g++.exe -shared  -Wl,--out-implib=devel31_64\libcodeblocks.a -Wl,--dll -Ld:\code\wxWidgets-3.1.5\lib\gcc_dll -Ldevel31_64 .objs31_64\sdk\configmanager-revision.o .objs31_64\sdk\annoyingdialog.o .objs31_64\sdk\autodetectcompilers.o .objs31_64\sdk\base64.o .objs31_64\sdk\blockallocated.o .objs31_64\sdk\cbart_provider.o .objs31_64\sdk\cbauibook.o .objs31_64\sdk\cbcolourmanager.o .objs31_64\sdk\cbdebugger_interfaces.o .objs31_64\sdk\cbeditor.o .objs31_64\sdk\cbeditorprintout.o .objs31_64\sdk\cbexception.o .objs31_64\sdk\cbplugin.o .objs31_64\sdk\cbproject.o .objs31_64\sdk\cbstatusbar.o .objs31_64\sdk\cbstyledtextctrl.o .objs31_64\sdk\cbthreadpool.o .objs31_64\sdk\cbtreectrl.o .objs31_64\sdk\cbworkspace.o .objs31_64\sdk\ccmanager.o .objs31_64\sdk\compileoptionsbase.o .objs31_64\sdk\compiler.o .objs31_64\sdk\compilercommandgenerator.o .objs31_64\sdk\compilerfactory.o .objs31_64\sdk\compileroptions.o .objs31_64\sdk\compiletargetbase.o .objs31_64\sdk\configmanager.o .objs31_64\sdk\configurationpanel.o .objs31_64\sdk\configuretoolsdlg.o .objs31_64\sdk\confirmreplacedlg.o .objs31_64\sdk\crc32.o .objs31_64\sdk\debuggermanager.o .objs31_64\sdk\editarrayfiledlg.o .objs31_64\sdk\editarrayorderdlg.o .objs31_64\sdk\editarraystringdlg.o .objs31_64\sdk\editor_hooks.o .objs31_64\sdk\editor_utils.o .objs31_64\sdk\editorbase.o .objs31_64\sdk\editorcolourset.o .objs31_64\sdk\editorlexerloader.o .objs31_64\sdk\editormanager.o .objs31_64\sdk\editpairdlg.o .objs31_64\sdk\editpathdlg.o .objs31_64\sdk\edittooldlg.o .objs31_64\sdk\encodingdetector.o .objs31_64\sdk\externaldepsdlg.o .objs31_64\sdk\filefilters.o .objs31_64\sdk\filegroupsandmasks.o .objs31_64\sdk\filemanager.o .objs31_64\sdk\findreplacedlg.o .objs31_64\sdk\genericmultilinenotesdlg.o .objs31_64\sdk\globals.o .objs31_64\sdk\importers_globals.o .objs31_64\sdk\incremental_select_helper.o .objs31_64\sdk\infowindow.o .objs31_64\sdk\loggers.o .objs31_64\sdk\logmanager.o .objs31_64\sdk\macrosmanager.o .objs31_64\sdk\manager.o .objs31_64\sdk\menuitemsmanager.o .objs31_64\sdk\mozilla_chardet\src\CharDistribution.o .objs31_64\sdk\mozilla_chardet\src\JpCntx.o .objs31_64\sdk\mozilla_chardet\src\LangBulgarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangCyrillicModel.o .objs31_64\sdk\mozilla_chardet\src\LangGreekModel.o .objs31_64\sdk\mozilla_chardet\src\LangHebrewModel.o .objs31_64\sdk\mozilla_chardet\src\LangHungarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangThaiModel.o .objs31_64\sdk\mozilla_chardet\src\nsBig5Prober.o .objs31_64\sdk\mozilla_chardet\src\nsCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscCharsetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscSM.o .objs31_64\sdk\mozilla_chardet\src\nsEUCJPProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCKRProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCTWProber.o .objs31_64\sdk\mozilla_chardet\src\nsGB2312Prober.o .objs31_64\sdk\mozilla_chardet\src\nsHebrewProber.o .objs31_64\sdk\mozilla_chardet\src\nsLatin1Prober.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSSM.o .objs31_64\sdk\mozilla_chardet\src\nsSBCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsSBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsSJISProber.o .objs31_64\sdk\mozilla_chardet\src\nsUniversalDetector.o .objs31_64\sdk\mozilla_chardet\src\nsUTF8Prober.o .objs31_64\sdk\multiselectdlg.o .objs31_64\sdk\newfromtemplatedlg.o .objs31_64\sdk\personalitymanager.o .objs31_64\sdk\pipedprocess.o .objs31_64\sdk\pluginmanager.o .objs31_64\sdk\pluginsconfigurationdlg.o .objs31_64\sdk\printing_types.o .objs31_64\sdk\projectbuildtarget.o .objs31_64\sdk\projectfile.o .objs31_64\sdk\projectfileoptionsdlg.o .objs31_64\sdk\projectlayoutloader.o .objs31_64\sdk\projectloader.o .objs31_64\sdk\projectloader_hooks.o .objs31_64\sdk\projectmanager.o .objs31_64\sdk\projectsfilemasksdlg.o .objs31_64\sdk\projecttemplateloader.o .objs31_64\sdk\scripting\bindings\sc_consts.o .objs31_64\sdk\scripting\bindings\sc_globals.o .objs31_64\sdk\scripting\bindings\sc_io.o .objs31_64\sdk\scripting\bindings\sc_plugin.o .objs31_64\sdk\scripting\bindings\sc_progress.o .objs31_64\sdk\scripting\bindings\sc_util_dialogs.o .objs31_64\sdk\scripting\bindings\sc_utils.o .objs31_64\sdk\scripting\bindings\sc_wxtypes.o .objs31_64\sdk\scripting\bindings\scriptbindings.o .objs31_64\sdk\scriptingmanager.o .objs31_64\sdk\scriptsecuritywarningdlg.o .objs31_64\sdk\scrollingdialog.o .objs31_64\sdk\sdk_events.o .objs31_64\sdk\searchresultslog.o .objs31_64\sdk\selecttargetdlg.o .objs31_64\sdk\templatemanager.o .objs31_64\sdk\tinywxuni.o .objs31_64\sdk\toolsmanager.o .objs31_64\sdk\uservarmanager.o .objs31_64\sdk\workspaceloader.o .objs31_64\sdk\xtra_res.o  -o devel31_64\codeblocks.dll -Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined  -lshfolder -ltxml -lwxscintilla_cb -lsquirrel -lgdi32 -lwxmsw31u
devel31_64/libsquirrel.a(sqstdaux.o): In function `sqstd_printcallstack':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:8: undefined reference to `__imp_sq_geterrorfunc'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:18: undefined reference to `__imp_sq_stackinfos'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:32: undefined reference to `__imp_sq_getlocal'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:35: undefined reference to `__imp_sq_gettype'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:41: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:45: undefined reference to `__imp_sq_getfloat'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:52: undefined reference to `__imp_sq_getstring'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:87: undefined reference to `__imp_sq_getbool'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:93: undefined reference to `__imp_sq_pop'
devel31_64/libsquirrel.a(sqstdaux.o): In function `_sqstd_aux_printerror':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:101: undefined reference to `__imp_sq_geterrorfunc'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:104: undefined reference to `__imp_sq_gettop'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:105: undefined reference to `__imp_sq_getstring'
devel31_64/libsquirrel.a(sqstdaux.o): In function `_sqstd_compiler_error(SQVM*, char const*, char const*, long long, long long)':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:119: undefined reference to `__imp_sq_geterrorfunc'
devel31_64/libsquirrel.a(sqstdaux.o): In function `sqstd_seterrorhandlers':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:127: undefined reference to `__imp_sq_setcompilererrorhandler'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:128: undefined reference to `__imp_sq_newclosure'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdaux.cpp:129: undefined reference to `__imp_sq_seterrorhandler'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_resize':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:25: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:27: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:29: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_swap4':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:48: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob_swap2':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:59: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__set':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:70: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:72: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:73: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:75: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:77: undefined reference to `__imp_sq_push'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__get':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:83: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:85: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:87: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:88: undefined reference to `__imp_sq_pushinteger'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__nexti':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_getinstanceup'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:94: undefined reference to `__imp_sq_throwerror'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:95: undefined reference to `__imp_sq_gettype'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:96: undefined reference to `__imp_sq_pushinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:100: undefined reference to `__imp_sq_getinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:102: undefined reference to `__imp_sq_pushinteger'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:105: undefined reference to `__imp_sq_pushnull'
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:108: undefined reference to `__imp_sq_throwerror'
devel31_64/libsquirrel.a(sqstdblob.o): In function `_blob__typeof':
D:/code/cbsource/script31/src/sdk/scripting/sqstdlib/sqstdblob.cpp:113: undefined reference to `__imp_sq_pushstring'
Process terminated with status 1 (0 minute(s), 49 second(s))



I also got an build error that was like the above error.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #12 on: April 24, 2021, 05:49:58 pm »
Code
From 7c9010e20725e0e11cfc63cf7d7ee91f1f021109 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Sat, 24 Apr 2021 11:47:24 -0400
Subject: Add define of EXPORT_LIB to Squirrel target

---
 src/CodeBlocks_wx31_64.cbp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/CodeBlocks_wx31_64.cbp b/src/CodeBlocks_wx31_64.cbp
index 16c775c76..6d31ed7d5 100644
--- a/src/CodeBlocks_wx31_64.cbp
+++ b/src/CodeBlocks_wx31_64.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
--
2.31.1.windows.1


I am still building with the above patch; but, it appears to have fixed the above build error at least partly.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #13 on: April 24, 2021, 07:09:11 pm »
Code
From fcd586699f2330ee51d684945031252d7122c378 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Sat, 24 Apr 2021 11:47:24 -0400
Subject: Add define of EXPORT_LIB to Squirrel target

---
 src/CodeBlocks_wx31.cbp    | 1 +
 src/CodeBlocks_wx31_64.cbp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/CodeBlocks_wx31.cbp b/src/CodeBlocks_wx31.cbp
index adfafe2aa..0652f4cf4 100644
--- a/src/CodeBlocks_wx31.cbp
+++ b/src/CodeBlocks_wx31.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
diff --git a/src/CodeBlocks_wx31_64.cbp b/src/CodeBlocks_wx31_64.cbp
index 16c775c76..6d31ed7d5 100644
--- a/src/CodeBlocks_wx31_64.cbp
+++ b/src/CodeBlocks_wx31_64.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
--
2.31.1.windows.1


Updated the patch file; I have only tested the 64 bit project and it builds without error.
I have yet to run the built binaries.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #14 on: April 25, 2021, 05:59:40 am »
Code
Welcome to the script console!
Plugin instance: (instance : 0x0000000006c8a740)
======= Test Test environment BEGINN =======
 this is intended to fail:
[ERROR] Test: test_string...................FAILED
[ERROR] got:    "hallo"
[ERROR] needed: "nope "

Executed tests: 1
passed tests:   0
failed tests:   1
======= Test Test environment END =======
======= Test wx String BEGINN =======
Test: tostring......................PASSED
Test: constructor(SQchar)...........PASSED
Test: cmp...........................PASSED
Test: cmp not.......................PASSED
Test: cmp string....................PASSED
Test: cmp string2...................PASSED
Test: cmp string not................PASSED
Test: cmp string not2...............PASSED
Test: Compare.......................PASSED
Test: Compare lt....................PASSED
Test: Compare gt....................PASSED
Test: Compare lt string.............PASSED
Test: Compare gt string.............PASSED
Test: _add..........................PASSED
Test: _add wxString+string..........PASSED
Test: _add string+wxString..........PASSED
Test: _add wxString+int.............PASSED
Test: _add wxString+float...........PASSED
Test: _cloned.......................PASSED
Test: IsEmpty.......................PASSED
Test: IsEmpty.......................PASSED
Test: Length........................PASSED
Test: length........................PASSED
Test: len...........................PASSED
Test: size..........................PASSED
Test: Lower.........................PASSED
Test: LowerCase.....................PASSED
Test: MakeLower.....................PASSED
Test: Upper.........................PASSED
Test: UpperCase.....................PASSED
Test: MakeUpper.....................PASSED
Test: Mid...........................PASSED
Test: Remove........................PASSED
Test: RemoveLast....................PASSED
Test: Replace ret...................PASSED
Test: Replace value.................PASSED
Test: AfterFirst....................PASSED
Test: AfterFirst str................PASSED
Test: AfterLast.....................PASSED
Test: AfterLast str.................PASSED
Test: BeforeFirst...................PASSED
Test: BeforeFirst str...............PASSED
Test: BeforeLast....................PASSED
Test: BeforeLast str................PASSED
Test: Right.........................PASSED
Test: Left..........................PASSED
Test: Matches.......................PASSED
Test: Find..........................PASSED
Test: Find not......................PASSED
Test: AddChar 'D'...................PASSED
Test: GetChar 0.....................PASSED
Test: Assignment 0..................PASSED
Test: Assignment 1..................PASSED
Test: Set 0.........................PASSED
Test: Set 1.........................PASSED
Test: ConcatNull....................PASSED
Test: wxString_ToLong good..........PASSED
Test: wxString_ToLong bad...........PASSED

Executed tests: 56
passed tests:   58
failed tests:   0
======= Test wx String END =======
======= Test wx String unicode BEGINN =======
test string: !5Aa ЉЩщӃ ウインカリ
[ERROR] Test: This implementation doesn't support UNICODE...MADE-FAILED
[ERROR] not implemented, as you can see on the wrong test string (it has to show Cyrillic  and ?Japanese? symbols

Executed tests: 0
passed tests:   0
failed tests:   1
======= Test wx String unicode END =======
======= Test wx Color BEGINN =======
Test: Set...........................PASSED
Test: tostring......................PASSED
Test: _cloned.......................PASSED
Test: Red...........................PASSED
Test: Green.........................PASSED
Test: Blue..........................PASSED
Test: IsOK..........................PASSED

Executed tests: 7
passed tests:   7
failed tests:   0
======= Test wx Color END  =======
======= Test wxArrayString BEGINN =======
Test: constructor...................PASSED
Test: Add wxString..................PASSED
Test: GetCount......................PASSED
Test: Index("String1")..............PASSED
Test: Index("String10").............PASSED
Test: Index("string1",true,false)...PASSED
Test: Index("string1",false,false)..PASSED
Test: Index("string2",false,false)..PASSED
Test: Index("string2",false,true)...PASSED
Test: Item..........................PASSED
Test: _cloned.......................PASSED
itemValue='String2 modified'; newValue='String2 modified'
Test: Item after modify.............PASSED
Test: SetItem.......................PASSED
Test: SetItem.......................PASSED
Test: SetItem old ref...............PASSED
Test: Clear.........................PASSED

Executed tests: 15
passed tests:   16
failed tests:   0
======= Test wxArrayString END  =======
======= Test wxFileName BEGINN =======
Test: constructor...................PASSED
Use path: \share\codeblocks\
Test: tostring......................PASSED
Test: _cloned.......................PASSED
Test: Assign........................PASSED
Test: GetDirCount...................PASSED
Test: GetDirs.......................PASSED
Test: Clear.........................PASSED
Test: AssignDir.....................PASSED
Test: AssignCwd = C:\repos\git\CB_Obf_scripting\src\output31_64\
Test: AssignCwd ????................PASSED
Test: GetCwd = C:\repos\git\CB_Obf_scripting\src\output31_64
Test: GetCwd ????...................PASSED
Test: AssignHomeDir = C:\Users\stahta01\
Test: AssignHomeDir ????............PASSED
Test: GetExt........................PASSED
Test: GetFullName...................PASSED
Test: GetFullPath...................PASSED
Test: GetLongPath = share\CodeBlocks\tips.txt
Test: GetLongPath ????..............PASSED
Test: GetName.......................PASSED
Test: GetPath = \share\codeblocks
Test: GetPath ????..................PASSED
Test: GetShortPath = \share\codeblocks\tips.txt
Test: GetShortPath ????.............PASSED
Test: GetVolume = 
Test: GetVolume ????................PASSED
Test: HasExt........................PASSED
Test: HasExt not (after ClearExt)...PASSED
Test: HasName.......................PASSED
[ERROR] Test: HasVolume.....................FAILED
[ERROR] got:    false
[ERROR] needed: true
Test: IsAbsolute....................PASSED
Test: IsOk..........................PASSED
Test: IsRelative....................PASSED
Test: IsDir.........................PASSED
Test: GetFullName...................PASSED
Test: GetFullPath...................PASSED
Test: InsertDir.....................PASSED
[ERROR] Test: InsertDir value...............FAILED
[ERROR] got:    "\newdir\share\codeblocks\"
[ERROR] needed: "newdir\\share\codeblocks\ "
Test: PrependDir....................PASSED
[ERROR] Test: PrependDir value..............FAILED
[ERROR] got:    "\newdir\share\codeblocks\"
[ERROR] needed: "newdir\\share\codeblocks\ "
Test: RemoveDir.....................PASSED
Test: AppendDir.....................PASSED
Test: AppendDir value...............PASSED
Test: MakeAbsolute..................PASSED
[ERROR] Test: MakeAbsolute value............FAILED
[ERROR] got:    "C:\share\codeblocks\tips.txt"
[ERROR] needed: "C:\Users\stahta01\\share\codeblocks\tips.txt "
Test: MakeRelativeTo................PASSED
[ERROR] Test: MakeRelativeTo value..........FAILED
[ERROR] got:    "..\..\share\codeblocks\tips.txt"
[ERROR] needed: "\share\codeblocks\tips.txt "
Test: Normalize.....................PASSED
[ERROR] Test: Normalize value...............FAILED
[ERROR] got:    "C:\share\codeblocks\tips.txt"
[ERROR] needed: "C:\Users\stahta01\\share\codeblocks\tips.txt "
Test: SameAs equal..................PASSED
Test: SameAs not equal..............PASSED
Test: SetExt........................PASSED
Test: SetEmptyExt...................PASSED
Test: SetEmptyExt has...............PASSED
Test: SetFullName...................PASSED
Test: SetName.......................PASSED
[ERROR] Test: SetVolume.....................FAILED
[ERROR] got:    "\\afterName\share\codeblocks\afterName.my"
[ERROR] needed: "\share\codeblocks\afterName.my "

Executed tests: 42
passed tests:   43
failed tests:   7
======= Test wxFileName END  =======
======= Test wxPoint BEGINN =======
Test: compare gt....................PASSED
Test: compare gt....................PASSED
Test: compare lt....................PASSED
Test: compare lt....................PASSED
Test: Cmp...........................PASSED
Test: Cmp not.......................PASSED
Test: _tostring.....................PASSED
Test: _cloned.......................PASSED

Executed tests: 8
passed tests:   8
failed tests:   0
======= Test wxPoint END  =======
======= Test wxSize BEGINN =======
Test: _tostring.....................PASSED
Test: _cloned.......................PASSED
Test: GetWidth......................PASSED
Test: GetHeight.....................PASSED
Test: SetWidth......................PASSED
Test: SetHeight.....................PASSED

Executed tests: 6
passed tests:   6
failed tests:   0
======= Test wxSize END  =======

Global executed tests: 146
Global passed tests:   138
Global failed tests:   9
Script loaded successfully

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org