Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: anandamu16 on February 05, 2017, 06:40:32 am

Title: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 05, 2017, 06:40:32 am
Hi,

I have to make my own customized codeblock where I can add my own plugins, widgets, modify scripts etc

Step1: I know I need to download wxwidget and build it. I have downloaded wxwidget2.8.12 and build it with configuration as SHARED=1 MONOLITHIC=1 UNICODE=1
Step2: I have downloaded codeblocks IDE (16.01) and its source code from codeblocks website.
Step3: I have opened codeblocks and set global variables namely wx, cb, cb_release_type as required and set compiler settings as GNU GCC Compiler with MINGW as path in directories
Step4: Next I open codeblocks.cbp(from codeblocks source code) in codeblocksIDE and try to compile but it starts giving me error in various files including plugin files such as debuggergdb.cpp etc.
Help me to know whether i am doing anything wrong. Do i need to set any compiler or linker defines. Anything else i am unaware of?

Note: My wxwidget installation and wx variable path set up is correct as I tried to make a wxwidget project from codeblocks and it works fine.
Also since i have wxwidget version 2.8.12 therefore I am trying to compile codeblocks.cbp rather than any other else like codeblocks_30.cbp etc.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: stahta01 on February 05, 2017, 07:10:00 am
Post a partial build log that shows the errors in code tags.
I can NOT see the image and it would likely be a waste of time to download the image.

Tim S.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 05, 2017, 08:27:00 am
I have modify the image and just added the build log for clear visibility.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 05, 2017, 01:38:02 pm
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

We need the text log from the "build log" tab... Your image is not enough information to help you
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: Jenna on February 05, 2017, 06:39:14 pm
I have modify the image and just added the build log for clear visibility.
Pleas just copy the log and paste it here in code-tags (the #-button).
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: headkase on February 05, 2017, 09:20:32 pm
I have downloaded wxwidget2.8.12 and build it with configuration as SHARED=1 MONOLITHIC=1 UNICODE=1

Did you specify "BUILD=release"?

See this page: http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows

Following that should get you going.  Also, post which compiler you are trying to use.  Different MinGW compilers have different quirks.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 06, 2017, 10:44:12 am
I have added the complete build log here:

Code

||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Abbreviations in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AStyle in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Autosave in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Compiler depslib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Compiler in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Debugger in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggerdriver.h||In member function 'void DebuggerCommands::Remove(_wxArrayDebuggerCommands)':|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\debug.h|194|warning: typedef 'wxDummyCheckInt' locally defined but not used [-Wunused-local-typedefs]|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\debug.h|224|note: in expansion of macro 'wxFORCE_SEMICOLON'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\dynarray.h|353|note: in expansion of macro 'wxCHECK2_MSG'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\dynarray.h|484|note: in expansion of macro '_WX_DEFINE_TYPEARRAY_HELPER'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\dynarray.h|665|note: in expansion of macro '_WX_DEFINE_TYPEARRAY'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\dynarray.h|646|note: in expansion of macro 'WX_DEFINE_TYPEARRAY_WITH_DECL'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\dynarray.h|823|note: in expansion of macro 'WX_DEFINE_TYPEARRAY'|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggerdriver.h|29|note: in expansion of macro 'WX_DEFINE_ARRAY'|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp||In member function 'void DebuggerGDB::DoBreak(bool)':|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1605|error: 'CreateToolhelp32SnapshotFunc' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1606|error: 'Process32FirstFunc' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1607|error: 'Process32NextFunc' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1609|error: 'TH32CS_SNAPALL' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1612|error: 'PROCESSENTRY32' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1613|error: 'lppe' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|1633|error: 'DebugBreakProcessFunc' was not declared in this scope|
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp|121|warning: '{anonymous}::idMenuSettings' defined but not used [-Wunused-variable]|
||=== Build failed: 7 error(s), 2 warning(s) (1 minute(s), 46 second(s)) ===|


Yes, I have build the wxwidget both as Debug as well as release
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: oBFusCATed on February 06, 2017, 11:11:35 am
The errors have nothing to do with wx. Inspect the source and see what is going on. Probably some macro is not right.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 06, 2017, 11:25:47 am
I have added the complete build log here:
No you did not. The complete build log is found under the "build log" tab in the message pane. There where this message appear you have to activate the tab "build log" and post what is written there... You posted the "build messages" tab...
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 06, 2017, 11:37:49 am
Sorry for the silly mistake. Pls check the build log here

Code

-------------- Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target pre-build steps
build_tools\autorevision\autorevision +wx +int +t . include/autorevision.h
'svn' is not recognized as an internal or external command,
operable program or batch file.
'git' is not recognized as an internal or external command,
operable program or batch file.
'svn' is not recognized as an internal or external command,
operable program or batch file.

-------------- Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc
cmd /c "cd sdk\resources & zip -0 -q ..\..\devel\share\CodeBlocks\manager_resources.zip images\*.png images\12x12\*.png images\16x16\*.png"
Running target pre-build steps
cmd /c if exist devel\exchndl.dll del devel\exchndl.dll

-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\resources.zip src\resources\*.xrc
zip -jq9 devel\share\CodeBlocks\start_here.zip src\resources\start_here\*.html src\resources\start_here\*.png
cmd /c "cd src\resources & zip -0 -q ..\..\devel\share\CodeBlocks\resources.zip images\*.png images\16x16\*.png"
cmd /c if not exist devel\exchndl.dll if exist exchndl\win32\bin\*.dll xcopy /Y exchndl\win32\bin\*.dll devel\
cmd /c if not exist devel\symsrv.yes if exist exchndl\win32\bin\symsrv.yes xcopy /Y exchndl\win32\bin\symsrv.yes devel\

-------------- Build: Abbreviations in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\abbreviations.zip plugins\abbreviations\resources\manifest.xml plugins\abbreviations\resources\*.xrc

-------------- Build: AStyle in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\astyle.zip plugins\astyle\resources\manifest.xml plugins\astyle\resources\*.xrc

-------------- Build: Autosave in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\autosave.zip plugins\autosave\manifest.xml plugins\autosave\*.xrc

-------------- Build: Compiler depslib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Compiler in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\compiler.zip plugins\compilergcc\resources\manifest.xml plugins\compilergcc\resources\*.xrc
cmd /c "cd plugins\compilergcc\resources & zip -0 -q ..\..\..\devel\share\CodeBlocks\compiler.zip images\*.png images\16x16\*.png"
cmd /c if not exist devel\share\CodeBlocks\compilers mkdir devel\share\CodeBlocks\compilers
cmd /c xcopy /D /Y plugins\compilergcc\resources\compilers\*.* devel\share\CodeBlocks\compilers
0 File(s) copied

-------------- Build: Debugger in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -Wno-deprecated-declarations -iquote.objs\include -I.objs\include -I. -IC:\wxMSW-2.8.12\wxMSW-2.8.12\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswud -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src\sdk\wxscintilla\include -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695 -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src -c C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp -o .objs\plugins\debuggergdb\debuggergdb.o
In file included from C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/defs.h:521:0,
                 from C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/wxprec.h:13,
                 from C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\include\sdk_common.h:37,
                 from C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\include\sdk.h:14:
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggerdriver.h: In member function 'void DebuggerCommands::Remove(_wxArrayDebuggerCommands)':
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/debug.h:194:43: warning: typedef 'wxDummyCheckInt' locally defined but not used [-Wunused-local-typedefs]
     #define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
                                           ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/debug.h:224:9: note: in expansion of macro 'wxFORCE_SEMICOLON'
         wxFORCE_SEMICOLON /* just to force a semicolon */
         ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/dynarray.h:353:7: note: in expansion of macro 'wxCHECK2_MSG'
       wxCHECK2_MSG( iIndex != wxNOT_FOUND, return,                    \
       ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/dynarray.h:484:5: note: in expansion of macro '_WX_DEFINE_TYPEARRAY_HELPER'
     _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP)
     ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/dynarray.h:665:5: note: in expansion of macro '_WX_DEFINE_TYPEARRAY'
     _WX_DEFINE_TYPEARRAY(_wxArray##name, name, base, classdecl)
     ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/dynarray.h:646:5: note: in expansion of macro 'WX_DEFINE_TYPEARRAY_WITH_DECL'
     WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class wxARRAY_DEFAULT_EXPORT)
     ^
C:\wxMSW-2.8.12\wxMSW-2.8.12\include/wx/dynarray.h:823:5: note: in expansion of macro 'WX_DEFINE_TYPEARRAY'
     WX_DEFINE_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
     ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggerdriver.h:29:1: note: in expansion of macro 'WX_DEFINE_ARRAY'
 WX_DEFINE_ARRAY(DebuggerCmd*, DebuggerCommands);
 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp: In member function 'void DebuggerGDB::DoBreak(bool)':
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1605:17: error: 'CreateToolhelp32SnapshotFunc' was not declared in this scope
             && (CreateToolhelp32SnapshotFunc!=NULL)
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1606:17: error: 'Process32FirstFunc' was not declared in this scope
             && (Process32FirstFunc!=NULL)
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1607:17: error: 'Process32NextFunc' was not declared in this scope
             && (Process32NextFunc!=NULL) )
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1609:56: error: 'TH32CS_SNAPALL' was not declared in this scope
             HANDLE snap = CreateToolhelp32SnapshotFunc(TH32CS_SNAPALL,0);
                                                        ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1612:17: error: 'PROCESSENTRY32' was not declared in this scope
                 PROCESSENTRY32 lppe;
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1613:17: error: 'lppe' was not declared in this scope
                 lppe.dwSize = sizeof(PROCESSENTRY32);
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1633:18: error: 'DebugBreakProcessFunc' was not declared in this scope
             if (!DebugBreakProcessFunc)
                  ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp: At global scope:
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:121:6: warning: '{anonymous}::idMenuSettings' defined but not used [-Wunused-variable]
 long idMenuSettings = wxNewId();
      ^
Process terminated with status 1 (1 minute(s), 46 second(s))
7 error(s), 2 warning(s) (1 minute(s), 46 second(s))
 
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: stahta01 on February 06, 2017, 02:25:32 pm
Code Snippet from debuggergdb.cpp
Code
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
#include "Tlhelp32.h"
typedef BOOL WINAPI   (*DebugBreakProcessApiCall)       (HANDLE);
typedef HANDLE WINAPI (*CreateToolhelp32SnapshotApiCall)(DWORD  dwFlags,   DWORD             th32ProcessID);
typedef BOOL WINAPI   (*Process32FirstApiCall)          (HANDLE hSnapshot, LPPROCESSENTRY32W lppe);
typedef BOOL WINAPI   (*Process32NextApiCall)           (HANDLE hSnapshot, LPPROCESSENTRY32W lppe);

DebugBreakProcessApiCall        DebugBreakProcessFunc = 0;
CreateToolhelp32SnapshotApiCall CreateToolhelp32SnapshotFunc = 0;
Process32FirstApiCall           Process32FirstFunc = 0;
Process32NextApiCall            Process32NextFunc = 0;

HINSTANCE kernelLib = 0;

#endif

Please verify that _WIN32_WINNT >= 0x0501 and if cross compiling "Tlhelp32.h" may need to be changed to "tlhelp32.h".

Post the full rebuild of debugger plugin if you can NOT find the error yourself.
Also post the information on your Compiler and Operating System.

Edit: You likely are running a real old Windows version or one too new for your compiler.

Tim S.

Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: stahta01 on February 06, 2017, 02:54:49 pm
Code
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -Wno-deprecated-declarations -iquote.objs\include -I.objs\include -I. -IC:\wxMSW-2.8.12\wxMSW-2.8.12\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswud -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src\sdk\wxscintilla\include -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695 -IC:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695\codeblocks-16.01svn10695\src -c C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp -o .objs\plugins\debuggergdb\debuggergdb.o

DO NOT MIX SOURCE CODE FROM CB AND A FORK AND EXPECT IT TO WORK!

Code
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release
Code
C:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695

Tim S.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 07, 2017, 05:35:22 am
I tried to include "tlhelp32.h" also as a precautionary measure, then also error remains the same
Code
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
#include "Tlhelp32.h"
#include "tlhelp32.h"
typedef BOOL WINAPI   (*DebugBreakProcessApiCall)       (HANDLE);
typedef HANDLE WINAPI (*CreateToolhelp32SnapshotApiCall)(DWORD  dwFlags,   DWORD             th32ProcessID);
typedef BOOL WINAPI   (*Process32FirstApiCall)          (HANDLE hSnapshot, LPPROCESSENTRY32W lppe);
typedef BOOL WINAPI   (*Process32NextApiCall)           (HANDLE hSnapshot, LPPROCESSENTRY32W lppe);

DebugBreakProcessApiCall        DebugBreakProcessFunc = 0;
CreateToolhelp32SnapshotApiCall CreateToolhelp32SnapshotFunc = 0;
Process32FirstApiCall           Process32FirstFunc = 0;
Process32NextApiCall            Process32NextFunc = 0;

HINSTANCE kernelLib = 0;

#endif

but if I comment the ifdef and endif condition from the above code. It build up fine. Why is it so, any idea?

Build log:

Code

-------------- Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target pre-build steps
build_tools\autorevision\autorevision +wx +int +t . include/autorevision.h
'svn' is not recognized as an internal or external command,
operable program or batch file.
'git' is not recognized as an internal or external command,
operable program or batch file.
'svn' is not recognized as an internal or external command,
operable program or batch file.

-------------- Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc
cmd /c "cd sdk\resources & zip -0 -q ..\..\devel\share\CodeBlocks\manager_resources.zip images\*.png images\12x12\*.png images\16x16\*.png"
Running target pre-build steps
cmd /c if exist devel\exchndl.dll del devel\exchndl.dll

-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\resources.zip src\resources\*.xrc
zip -jq9 devel\share\CodeBlocks\start_here.zip src\resources\start_here\*.html src\resources\start_here\*.png
cmd /c "cd src\resources & zip -0 -q ..\..\devel\share\CodeBlocks\resources.zip images\*.png images\16x16\*.png"
cmd /c if not exist devel\exchndl.dll if exist exchndl\win32\bin\*.dll xcopy /Y exchndl\win32\bin\*.dll devel\
cmd /c if not exist devel\symsrv.yes if exist exchndl\win32\bin\symsrv.yes xcopy /Y exchndl\win32\bin\symsrv.yes devel\

-------------- Build: Abbreviations in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\abbreviations.zip plugins\abbreviations\resources\manifest.xml plugins\abbreviations\resources\*.xrc

-------------- Build: AStyle in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\astyle.zip plugins\astyle\resources\manifest.xml plugins\astyle\resources\*.xrc

-------------- Build: Autosave in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\autosave.zip plugins\autosave\manifest.xml plugins\autosave\*.xrc

-------------- Build: Compiler depslib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.

-------------- Build: Compiler in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

Target is up to date.
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\compiler.zip plugins\compilergcc\resources\manifest.xml plugins\compilergcc\resources\*.xrc
cmd /c "cd plugins\compilergcc\resources & zip -0 -q ..\..\..\devel\share\CodeBlocks\compiler.zip images\*.png images\16x16\*.png"
cmd /c if not exist devel\share\CodeBlocks\compilers mkdir devel\share\CodeBlocks\compilers
cmd /c xcopy /D /Y plugins\compilergcc\resources\compilers\*.* devel\share\CodeBlocks\compilers
0 File(s) copied

-------------- Build: Debugger in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -Wno-deprecated-declarations -Wno-unused-local-typedefs -iquote.objs\include -I.objs\include -I. -IC:\wxMSW-2.8.12\wxMSW-2.8.12\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswud -IC:\MinGW\include -IC:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\sdk\wxscintilla\include -IC:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release -IC:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src -IC:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\include -c C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp -o .objs\plugins\debuggergdb\debuggergdb.o
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp: In member function 'void DebuggerGDB::DoBreak(bool)':
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1609:17: error: 'CreateToolhelp32SnapshotFunc' was not declared in this scope
             && (CreateToolhelp32SnapshotFunc!=NULL)
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1610:17: error: 'Process32FirstFunc' was not declared in this scope
             && (Process32FirstFunc!=NULL)
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1611:17: error: 'Process32NextFunc' was not declared in this scope
             && (Process32NextFunc!=NULL) )
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1613:56: error: 'TH32CS_SNAPALL' was not declared in this scope
             HANDLE snap = CreateToolhelp32SnapshotFunc(TH32CS_SNAPALL,0);
                                                        ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1616:17: error: 'PROCESSENTRY32' was not declared in this scope
                 PROCESSENTRY32 lppe;
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1617:17: error: 'lppe' was not declared in this scope
                 lppe.dwSize = sizeof(PROCESSENTRY32);
                 ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:1637:18: error: 'DebugBreakProcessFunc' was not declared in this scope
             if (!DebugBreakProcessFunc)
                  ^
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp: At global scope:
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release\src\plugins\debuggergdb\debuggergdb.cpp:123:6: warning: '{anonymous}::idMenuSettings' defined but not used [-Wunused-variable]
 long idMenuSettings = wxNewId();
      ^
Process terminated with status 1 (0 minute(s), 20 second(s))
7 error(s), 1 warning(s) (0 minute(s), 20 second(s))
 

I rebuild the code but the error remains the same.

Note: Info about operating system and compiler
Windows 7 Enterprise, gcc 5.3.0
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 07, 2017, 06:47:28 am
Quote
DO NOT MIX SOURCE CODE FROM CB AND A FORK AND EXPECT IT TO WORK!

Oh, sorry. I mixed everything. Now, I have tried to build it separately, still the same errors :(
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 07, 2017, 01:15:03 pm
I build up codeblocks sdk successfully after making a few changes in file app.cpp and debuggergdb.cpp.
Finally my codeblock.exe is generated but when I try to open it, it shows some file were missing such as libstd6.dll, wxmsw28u.dll etc. I copied them from Mingw and wxwidget into the same directly. It worked fine.

After opening codeblocks.exe, everything was fine but there were no widgets or anything else. The reason could be bcz on building 'codeblock.cbp' it doesn't generated anything else except folders namely compiler and plugins.

So my question is, Do I need to generate templates, write scripts and evrything else, or I can directly copy from source code and use it?
or do I need to build 'codeblocks.workspace' to get all?
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 07, 2017, 03:47:44 pm
you have to run the update.bat file
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 08, 2017, 07:05:59 am
Oh Thanks,

update.bat works fine, It copied all the code from backend and placed it on desired position.
Please let me know, if any other file I need to run.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 15, 2017, 02:04:32 pm
Hi Tim,

Quote
Please verify that _WIN32_WINNT >= 0x0501 and if cross compiling "Tlhelp32.h" may need to be changed to "tlhelp32.h".

Can you tell me, how to verify that "_WIN32_WINNT >= 0x0501" ?
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: stahta01 on February 15, 2017, 04:09:45 pm
Hi Tim,

Quote
Please verify that _WIN32_WINNT >= 0x0501 and if cross compiling "Tlhelp32.h" may need to be changed to "tlhelp32.h".

Can you tell me, how to verify that "_WIN32_WINNT >= 0x0501" ?

To try to display the value; but, I normally just define it to what I want it to be.
Code
#include <iostream>

#include <w32api.h>
#include <windef.h>

using namespace std;

int main()
{
    cout << "_WIN32_WINNT := " << _WIN32_WINNT << endl;
    return 0;
}

Tim S.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 16, 2017, 05:27:25 am
ok Thanks.

I asked that question because I want to know, Is there any way to debug Codeblocks sdk code while building?
I mean, suppose I made some changes in different file of codeblocks sdk and I want to check its effect before releasing Binary, Is it a way to debug?

May be I am asking a bit silly questions here, but I just want to be clear.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 16, 2017, 03:33:54 pm
Quote
any way to debug Codeblocks sdk code while building
you can't debug c/c++ code while building... You can debug code while execution... And yes you can debug codeblocks within codeblocks

Quote
I mean, suppose I made some changes in different file of codeblocks sdk and I want to check its effect before releasing Binary, Is it a way to debug?
no idea what you want to do... But "normally" you have to execute code to test it. There are some static code analyzer but i doubt this is a thing you want.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 17, 2017, 06:15:41 am
Quote
You can debug code while execution... And yes you can debug codeblocks within codeblocks

I tried to debug the plugin code. I first build the plugin and then press debugger/continue icon with setting breakpoints at some places within code.

But the code gets debugged itself in no time and didn't stopped at any breakpoints. I mean while debugging, if I can set the breakpoints, code must get stopped at that breakpoint.
I have added the debugger output for your reference. I am doing something wrong or anything else is a problem
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 17, 2017, 07:58:52 am
I realized, after building the code, I need to run i.e; execute the code. As soon as I execute the code, it gaves me the termination error with status -1
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 17, 2017, 02:10:54 pm
Please always post the whole text from the log windows as text within code tags (the # symbol in the post editor)  and not images. For first you are missing a lot information for the second it uses a lot more space on the server and for the third it is not readable on mobile devices...

Quote
I tried to debug the plugin code. I first build the plugin and then press debugger/continue icon with setting breakpoints at some places within code.

But the code gets debugged itself in no time and didn't stopped at any breakpoints. I mean while debugging, if I can set the breakpoints, code must get stopped at that breakpoint.
I have added the debugger output for your reference. I am doing something wrong or anything else is a problem
Please post the full debugger log and a rebuild log. I think your project is not configured properly...

Quote
I realized, after building the code, I need to run i.e; execute the code. As soon as I execute the code, it gaves me the termination error with status -1
well your code crashes, and you need the debugger to find the problem...
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 20, 2017, 05:03:36 am
Sorry, I have added the build log, kindly check.

Code
-------------- Clean: default in MenuPlugin (compiler: GNU GCC Compiler)---------------

Cleaned "MenuPlugin - default"

-------------- Build: default in MenuPlugin (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -g -Wno-deprecated-declarations -Wno-unused-local-typedefs -std=gnu++11 -IC:\zbcqcm\codeblocks_svn_code\code\src\include -IC:\zbcqcm\codeblocks_svn_code\code\src\sdk\wxscintilla\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswud -IC:\MinGW\include -IC:\zbcqcm\codeblocks_svn_code\code\src\sdk\wxscintilla\include -IC:\zbcqcm\codeblocks_svn_code\code\src\include -IC:\zbcqcm\codeblocks_svn_code\code\src\include\tinyxml -c C:\Users\zbcqcm\Documents\Codeblocks_SVN\MenuPlugin\MenuPlugin.cpp -o .objs\MenuPlugin.o
mingw32-g++.exe -shared   -Wl,--dll -LC:\zbcqcm\codeblocks_svn_code\code\src\devel -LC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll -LC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll -L"C:\Program Files (x86)\CodeBlocks" .objs\MenuPlugin.o  -o MenuPlugin.dll -mthreads  -lcodeblocks -lwxmsw28u
Output file is MenuPlugin.dll with size 343.59 KB
Running target post-build steps
zip -j9 MenuPlugin.zip manifest.xml
zip -j9 MenuPlugin.cbplugin MenuPlugin.dll MenuPlugin.zip
updating: manifest.xml (152 bytes security) (deflated 54%)
updating: MenuPlugin.dll (152 bytes security) (deflated 70%)
updating: MenuPlugin.zip (152 bytes security) (deflated 14%)
Process terminated with status 0 (1 minute(s), 18 second(s))
0 error(s), 0 warning(s) (1 minute(s), 18 second(s))
 

-------------- Run: default in MenuPlugin (compiler: GNU GCC Compiler)---------------

Checking for existence: C:\Users\zbcqcm\Documents\Codeblocks_SVN\MenuPlugin\MenuPlugin.dll
Executing: "C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe"  (in C:\Users\zbcqcm\Documents\Codeblocks_SVN\MenuPlugin\.)
Process terminated with status -1 (0 minute(s), 9 second(s))
 

My plugin is building fine besides It is installing properly into codeblocks. Error occurs only when I try to run my plugin.

P.S I will make sure to put the build log in text instead of images, Thanks.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 20, 2017, 11:07:45 am
From the debugger log i see that codeblocks exits immediately so there seems to be a error at startup. Where do you set the break point? Try to setting it in src/app.cpp line 582 and if it stops there try to continue. The debugger should report some sigfault or a like with a backtrace. Also you can try to enable Settings->Debugger->GDB->Default->Catch c++ exception
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 20, 2017, 12:37:18 pm
Quote
Try to setting it in src/app.cpp line 582 and if it stops there try to continue

I am compiling my plugin project, it doesn't have any app.cpp file. App.cpp file is a part of codeblocks sdk.
Since I dont have any file (app.cpp) in my project, I can't set breakpoints.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 20, 2017, 01:32:27 pm
you can open your plugin and the codeblocks project file at the same time in codeblocks. Activate your plugin project by double click on it or by right click->activate project in the management pane.

Open the app.cpp file from codeblocks, set the break point at the line and start the debugger and your plugin will debugged, but codeblocks will halt at the break point...
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 21, 2017, 05:36:09 am
my plugin is present in "c:/user/documents/Menuplugin"
my codeblocks svn code is present in "c:/xyz/codeblocks_svn_code"

To install the plugin, I open codeblocks.exe, go to plugin->manage plugins->Install New and direct it to MenuPlugin.cbplugin file
At backend it copies the MenuPlugin.dll file and put it incside codeblocks_svn_code under plugin section.

Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?

Quote
you can open your plugin and the codeblocks project file at the same time in codeblocks.
I try to do the same and got error - failed
Debugger log:
Code
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding file: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe
Changing directory to: C:/Users/zbcqcm/Documents/Codeblocks_SVN/try_MenuPlugin_wxSmith_Combined/.
Set variable: PATH=.;C:\zbcqcm\codeblocks_svn_code\code\src\devel;C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll;C:\MinGW\bin;C:\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\doxygen\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\SEGGER\JLink_V610l;C:\GNU_Tools_ARM_Embedded\6.2_2016q4\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\arm-none-eabi\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\arm-none-eabi\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\bin;C:\SysGCC\arm-elf\bin;C:\SysGCC\arm-eabi\bin;C:\Program Files (x86)\AXSEM\AXSDB\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\TDM-GCC-32\bin;C:\Program Files (x86)\WinRAR;C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\bin;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin;\\ C\CB_20161120_rev10922_win32\zip300xn-x64\zip300xn-x64;\\ C\boost\boost-jam-3.1.18-1-ntx86\boost-jam-3.1.18-1-ntx86;C:\Program Files\Git\bin;C:\cygwin64\bin;C:\codeblocks zip\zip300xn-x64\zip300xn-x64
Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
failed

One more question, something deviating from topic
- I build codeblocks sdk code and as a result 2 additional folders were formed namely "devel", "output". Each containing codeblock.exe. I need to ask, which codeblock.exe I should work on?
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: stahta01 on February 21, 2017, 05:55:01 am
my plugin is present in "c:/user/documents/Menuplugin"
my codeblocks svn code is present in "c:/xyz/codeblocks_svn_code"

To install the plugin, I open codeblocks.exe, go to plugin->manage plugins->Install New and direct it to MenuPlugin.cbplugin file
At backend it copies the MenuPlugin.dll file and put it incside codeblocks_svn_code under plugin section.

Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?

Quote
you can open your plugin and the codeblocks project file at the same time in codeblocks.
I try to do the same and got error - failed
Debugger log:
Code
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding file: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe
Changing directory to: C:/Users/zbcqcm/Documents/Codeblocks_SVN/try_MenuPlugin_wxSmith_Combined/.
Set variable: PATH=.;C:\zbcqcm\codeblocks_svn_code\code\src\devel;C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll;C:\MinGW\bin;C:\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\doxygen\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\SEGGER\JLink_V610l;C:\GNU_Tools_ARM_Embedded\6.2_2016q4\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\arm-none-eabi\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\arm-none-eabi\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\bin;C:\SysGCC\arm-elf\bin;C:\SysGCC\arm-eabi\bin;C:\Program Files (x86)\AXSEM\AXSDB\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\TDM-GCC-32\bin;C:\Program Files (x86)\WinRAR;C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\bin;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin;\\ C\CB_20161120_rev10922_win32\zip300xn-x64\zip300xn-x64;\\ C\boost\boost-jam-3.1.18-1-ntx86\boost-jam-3.1.18-1-ntx86;C:\Program Files\Git\bin;C:\cygwin64\bin;C:\codeblocks zip\zip300xn-x64\zip300xn-x64
Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
failed

One more question, something deviating from topic
- I build codeblocks sdk code and as a result 2 additional folders were formed namely "devel", "output". Each containing codeblock.exe. I need to ask, which codeblock.exe I should work on?

For running use the one in "output"; for debugging use the one in "devel".

You really NEED to learn how to build a contrib plugin for Code::Blocks; it will show you a lot!!
Before trying to build your own core CB plugin; you need to be able to build an contrib CB plugin.

Tim S.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 21, 2017, 10:38:16 am
Please Enable full debug logging: Settings->Debugger->Common->Full (Debug) log. There you see exactly what is going on, and why the debugger fails.


Quote
Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?
No. Simply open both projects in one workspace (by opening simply both projects). But the settings of the projects have to be ok, and i think there is your problem...

As Tim suggested you should try to build and debug a contrib plugin first.
1) For this open a contrib plugin project from /PATHTOCODEBLOCKS/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cbp .
2) Then open /PATHTOCODEBLOCKS/src/CodeBlocks.cbp .
3) Activate again the ProjectOptionsManipulator.cbp by double click int the Management pane. This project should now be marked as active (The name is bold).
4) Check if the correct "default" target is selected in the toolbar near the build button
5) In the Management panel browse to Codeblocks/Source/src/app.cpp  (BUT DON'T ACTIVATE THE PROJECT) and go to line 610. Set a breakpoint there
6) Set a breakpoint of interest in the ProjectOptionsManipulator source
7) Now hit the debugger button
8) It should now halt first at src/app.cpp:610
9) Hit continue if the debugger stops until you hit the desired breakpoint

If this works you can look into the project settings, how the project is set up and compare it wit your settings. Then you should find the error why your plugin is not debugging correctly. If you have found the error can you please post it here?

[EDIT:] I am not sure but probably you have to build codeblocks with debugging symbols enabled. You do this by Settings->Global Variables->cb_release_type and add "-g" in the "base" field. Then you have to rebuild Codeblocks by hitting Build->Rebuild
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 21, 2017, 11:53:16 am
Ok , i think i have found your problem. The wizard script for plugins is not really created for targets to be able to debug. I have created a updated script:
0) Close Codeblocks
1) Download the attached archive
1.1) Extract the archive
2) copy the extracted script to YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\share\CodeBlocks\templates\wizard\plugins\wizard.script
3) Open codeblocks by clicking on YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\codeblocks.exe
4) Create a new project: Codeblocks plugin
5) Go trough the wizard pages
6) This should create a project with two targets: "default" and "to_codeblocks"
   * "default"               will create the normal PLUGIN_NAME.cbplugin file for installation
   * "to_codeblocks"   will build and install the plugin in one step to your development version of codeblocks. With this target debugging should work out of the box

If this works i will try to talk to the devs to update the script
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 22, 2017, 07:52:21 am

Hi @BlueHazzard

Thanks for the detailed explanation.
Quote
No. Simply open both projects in one workspace (by opening simply both projects). But the settings of the projects have to be ok, and i think there is your problem...

As Tim suggested you should try to build and debug a contrib plugin first.
1) For this open a contrib plugin project from /PATHTOCODEBLOCKS/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cbp .
2) Then open /PATHTOCODEBLOCKS/src/CodeBlocks.cbp .
3) Activate again the ProjectOptionsManipulator.cbp by double click int the Management pane. This project should now be marked as active (The name is bold).
4) Check if the correct "default" target is selected in the toolbar near the build button
5) In the Management panel browse to Codeblocks/Source/src/app.cpp  (BUT DON'T ACTIVATE THE PROJECT) and go to line 610. Set a breakpoint there
6) Set a breakpoint of interest in the ProjectOptionsManipulator source
7) Now hit the debugger button
8) It should now halt first at src/app.cpp:610
9) Hit continue if the debugger stops until you hit the desired breakpoint
I follow the steps and it works fine.Thanks

After it, I go to ProjectOptionsManipulator.cbp and then go into it build options (right click->buildOptions) but it has no any relevant settings inside. I mean Other directories tab doesn't contain any path and same with linker and compiler settings. Even pre/post build steps tab also doesn't contain any info. Then I go into the ProjectOptionsManipulator project Properties, There also I compared the settings it was fine.
I checked into the files inside projectOptionsManipulator contrib plug, Th only additional file is makefile, which is not available in my menuplugin project.

Quote
If this works you can look into the project settings, how the project is set up and compare it wit your settings
By this, did you mean to compare the settings present in makefile?

After matching the properties, I am getting the error while debugging
My debuggerlog after matching project properties:
Code
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\zbcqcm\codeblocks_svn_code\code\src\plugins\contrib\MenuPlugin\
Adding source dir: C:\zbcqcm\codeblocks_svn_code\code\src\plugins\contrib\MenuPlugin\
Adding file: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe
Changing directory to: C:/zbcqcm/codeblocks_svn_code/code/src/devel
Set variable: PATH=.;C:\zbcqcm\codeblocks_svn_code\code\src\devel;C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll;C:\MinGW\bin;C:\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\doxygen\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\SEGGER\JLink_V610l;C:\GNU_Tools_ARM_Embedded\6.2_2016q4\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\arm-none-eabi\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\arm-none-eabi\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\bin;C:\SysGCC\arm-elf\bin;C:\SysGCC\arm-eabi\bin;C:\Program Files (x86)\AXSEM\AXSDB\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\TDM-GCC-32\bin;C:\Program Files (x86)\WinRAR;C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\bin;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin;\\ C\CB_20161120_rev10922_win32\zip300xn-x64\zip300xn-x64;\\ C\boost\boost-jam-3.1.18-1-ntx86\boost-jam-3.1.18-1-ntx86;C:\Program Files\Git\bin;C:\cygwin64\bin;C:\codeblocks zip\zip300xn-x64\zip300xn-x64

[debug]Command-line: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
[debug]Working dir : C:\zbcqcm\codeblocks_svn_code\code\src\devel

Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.9.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\zbcqcm\codeblocks_svn_code\code\src\devel\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/MenuPlugin/
[debug]Source directories searched: C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/MenuPlugin;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/zbcqcm/codeblocks_svn_code/code/src/src/app.cpp:610"
[debug]Breakpoint 2 at 0x402d12: file C:\zbcqcm\codeblocks_svn_code\code\src\src\app.cpp, line 610.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:181"
[debug]No source file named C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp.
[debug]Breakpoint 3 ("C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:181") pending.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:161"
[debug]No source file named C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp.
[debug]Breakpoint 4 ("C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:161") pending.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:85"
[debug]No source file named C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp.
[debug]Breakpoint 5 ("C:/zbcqcm/codeblocks_svn_code/code/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cpp:85") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe

Child process PID: 4488

[debug][New Thread 4488.0xfcc]
[debug]Breakpoint 2, CodeBlocksApp::OnInit (this=0x5d707f0) at C:\zbcqcm\codeblocks_svn_code\code\src\src\app.cpp:610
[debug]C:\zbcqcm\codeblocks_svn_code\code\src\src\app.cpp:610:21787:beg:0x402d12
[debug]>>>>>>cb_gdb:

At C:\zbcqcm\codeblocks_svn_code\code\src\src\app.cpp:610
Continuing...

[debug]> cont
[debug]Continuing.
[debug]Starting Code::Blocks svn build  rev 0 Feb  7 2017, 17:16:55 - wx2.8.12 (Windows, unicode) - 32 bit
[debug][Inferior 1 (process 4488) exited with code 037777777777]
[debug]>>>>>>cb_gdb:

[Inferior 1 (process 4488) exited with code 037777777777]

[debug]> quit

Debugger finished with status 0

Quote
I am not sure but probably you have to build codeblocks with debugging symbols enabled. You do this by Settings->Global Variables->cb_release_type and add "-g" in the "base" field. Then you have to rebuild Codeblocks by hitting Build->Rebuild
I did the build, using "-g" symbol inside cb_release_type.

I will check your wizard, once I understand the makefile present in projectOptionsManipulator plugin.
[/quote]
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 22, 2017, 10:37:15 am
Quote
Ok , i think i have found your problem. The wizard script for plugins is not really created for targets to be able to debug. I have created a updated script:
0) Close Codeblocks
1) Download the attached archive
1.1) Extract the archive
2) copy the extracted script to YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\share\CodeBlocks\templates\wizard\plugins\wizard.script
3) Open codeblocks by clicking on YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\codeblocks.exe
4) Create a new project: Codeblocks plugin
5) Go trough the wizard pages
6) This should create a project with two targets: "default" and "to_codeblocks"
   * "default"               will create the normal PLUGIN_NAME.cbplugin file for installation
   * "to_codeblocks"   will build and install the plugin in one step to your development version of codeblocks. With this target debugging should work out of the box
It gives the same error, as in previous case

Quote
* "to_codeblocks"   will build and install the plugin in one step to your development version of codeblocks
Does it mean that, on building our project on "to_codeblock" target, it will build up as well as plugin gets automatically installed in codeblocks.? If its so, I checked my plugins sections inside codeblocks IDE. Plugin-> Manage Plugins-> Look into the list.
But there was no plugin installed in the list.
I also try to debug the plugin, but the error was same.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 22, 2017, 11:31:29 am
Quote
Does it mean that, on building our project on "to_codeblock" target, it will build up as well as plugin gets automatically installed in codeblocks.? If its so, I checked my plugins sections inside codeblocks IDE. Plugin-> Manage Plugins-> Look into the list.
But there was no plugin installed in the list.
I also try to debug the plugin, but the error was same.
Yes, it gets installed in the development output of Codeblocks (the subfolder devel, hopefully not the codeblocks folder with what you work).
Just to make things clear: There should be 3 folders with codeblocks.exe
1) CODEBLOCKS_INSTALLATION <-- Something like C:\Program Files\Codeblocks  - This is your installation of codeblocks. If you use Codeblocks in your daily work this executable should be used
2) CODEBLOCKS_DEVEL  <-- Something like C:\User\MYUSER\Documents\Programming\Codeblocks\src\codeblocks_sf\src\devel   - This is the output directory if you build codeblocks. This gets overwritten every time you build codeblocks
3) CODEBLOCKS_OUTPUT  <-- This folder gets created/updated if you run the update.bat script from the src folder. You can copy the content from this folder over CODEBLOCKS_INSTALLATION to update your installation

Now if you run my script and build the "to_codeblock" target the output gets copied and installed to CODEBLOCKS_DEVEL. Now if you want to run your plugin you have to run CODEBLOCKS_DEVEL\codeblocks.exe.

I made a mistake in the script: the run parameter for codeblocks are missing. For the target to_codeblocks you should add
Code
--debug-log --no-dde --no-check-associations --multiple-instance --no-splash-screen --verbose -p debug
To Project->Set programs argument->Program arguments    You have to select the correct target from the list.
i have attached a updated version of the script



Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 22, 2017, 11:33:00 am
Code
[debug]> cont
[debug]Continuing.
[debug]Starting Code::Blocks svn build  rev 0 Feb  7 2017, 17:16:55 - wx2.8.12 (Windows, unicode) - 32 bit
[debug][Inferior 1 (process 4488) exited with code 037777777777]
[debug]>>>>>>cb_gdb:

Your application still crashes and at the moment i have no idea how i can help you with this...

[EDIT:] Can you post the code of your plugin?
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 22, 2017, 12:04:51 pm
Quote
Now if you run my script and build the "to_codeblock" target
You want me to run your script through CODEBLOCKS_INSTALLATION or CODEBLOCKS_DEVEL?
FYI: I am developing everything through CODEBLOCKS_DEVEL and checking on CODEBLOCKS_DEVEL only.
Note: I used CODEBLOCKS_INSTALLATION to create CODEBLOCKS_DEVEL and from then I am using only CODEBLOCKS_DEVEL. Let me know, if i am doing something wrong.?
I will make a plugin project separately through CODEBLOCKS_DEVEL based on "your" wizard. I will add the project here itself.
Bdw I don't think, It is something related to plugin code.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 22, 2017, 12:22:16 pm
ok, let me update it.
I will use the same terminology like below.
Quote
1) CODEBLOCKS_INSTALLATION <-- Something like C:\Program Files\Codeblocks  - This is your installation of codeblocks. If you use Codeblocks in your daily work this executable should be used
2) CODEBLOCKS_DEVEL  <-- Something like C:\User\MYUSER\Documents\Programming\Codeblocks\src\codeblocks_sf\src\devel   - This is the output directory if you build codeblocks. This gets overwritten every time you build codeblocks
3) CODEBLOCKS_OUTPUT  <-- This folder gets created/updated if you run the update.bat script from the src folder. You can copy the content from this folder over CODEBLOCKS_INSTALLATION to update your installation

Firstly: I create a plugin through CODEBLOCKS_DEVEL  and try to execute it. It gave me the execution error.
Next: I create a plugin through CODEBLOCKS_INSTALLATION (with updated wizard.script for plugin that you shared)and try to execute it. It works fine i.e; after execution it opens the CODEBLOCKS_DEVEL  IDE window to check the plugin.
Next:  I create a plugin through CODEBLOCKS_INSTALLATION (with default wizard.script for plugin that comes by default)and try to execute it, it gave me the same error that I was receiving from beginnin.
So, I doubt my plugin is executing fine because of the changes you have made in wizard.script file. Can you help me to understand the changes?

So my question is:
- Why it didn't work in the First case?
- So for now, I should remember that.... I need to develop everything through CODEBLOCKS_INSTALLATION, check it on CODEBLOCKS_DEVEL and for distribution, I should use CODEBLOCKS_OUTPUT?
- I tried to build wxwidget application through CODEBLOCKS_DEVEL  and try to execute it using CODEBLOCKS_DEVEL only and that works fine, why was it so. I mean likewise plugin, wxwidget application should also fail to execute but that worked fine?

Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 22, 2017, 12:37:08 pm
You copy the script to CODEBLOCKS_INSTALLATION or CODEBLOCKS_OUTPUT. Then you run the appropriate codeblocks.exe. With this instance you create and develop your plugin. If you run the plugin it will run trough CODEBLOCKS_DEVEL with a separate profile so you won't kill your working environment if something goes wrong.

Generally you should not run CODEBLOCKS_DEVEL while you are developing on codeblocks/plugins but always  CODEBLOCKS_INSTALLATION or minimal CODEBLOCKS_OUTPUT.
Things are like this
not stable                     < a bit stable                    < stable
CODEBLOCKS_DEVEL   < CODEBLOCKS_OUTPUT  < CODEBLOCKS_INSTALLATION

Also CODEBLOCKS_DEVEL will get overwritten every time you build codeblocks.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 22, 2017, 12:54:57 pm
What i changed in the script:
1) Add the target to_codeblocks
1.1) Set the output directory to CODEBLOCKS_DEVEL
1.2) Copy all needed resources to  CODEBLOCKS_DEVEL
1.3) Add the call parameters so CODEBLOCKS_DEVEL will get called with a grade of isolation

Now this makes it possible to debug the plugin. It should not influence your plugin, but only how you debug it. So if you say it "executes" right do you mean "debugging" or also executing?
One possibility would be that you are missing some DLL and if you call it with CODEBLOCKS_DEVEL all dlls are in place, but it is hard to tell...

Q: Why are this steps needed for debugging the plugin?
GDB needs a executable to debug dlls (a plugin is a dll) and in our case this is CODEBLOCKS_DEVEL. My script copies all to CODEBLOCKS_DEVEL and runs CODEBLOCKS_DEVEL trought the debugger. CODEBLOCKS_DEVEL will then load your plugin and you can debug it.

Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 22, 2017, 01:36:17 pm
Quote
What i changed in the script:
1) Add the target to_codeblocks
1.1) Set the output directory to CODEBLOCKS_DEVEL
1.2) Copy all needed resources to  CODEBLOCKS_DEVEL
1.3) Add the call parameters so CODEBLOCKS_DEVEL will get called with a grade of isolation
If the changes are required in the script, how it was working before for other users? Everyone should have the problem, not only me? :(

Quote
So if you say it "executes" right do you mean "debugging" or also executing?
I mean 'executing'. i.e; build and run command.

Quote
One possibility would be that you are missing some DLL and if you call it with CODEBLOCKS_DEVEL all dlls are in place, but it is hard to tell...
You mean to say that.....So this could be the possible reason to not work with CODEBLOCKS_DEVEL?


Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 22, 2017, 02:20:32 pm
Quote
If the changes are required in the script, how it was working before for other users? Everyone should have the problem, not only me? :(
Probably it never worked, and all developer fixed the project by them self (and also there are not that many plugin developer out there)...

Quote
You mean to say that.....So this could be the possible reason to not work with CODEBLOCKS_DEVEL?
I have no idea... this was a shot in the dark
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: anandamu16 on February 23, 2017, 07:47:22 am
Thanks for the help. Creating and executing a plugin otherwise will be a great challenge for any new plugin developer.
I will post here in case I faced any additional error.

Moreover, may be your modified wizard script for plugins can be linked to codeblocks default plugin wizard by codeblocks official developers.
Title: Re: Compiling codeblocks original source code to develop my own customized codeblock
Post by: BlueHazzard on February 23, 2017, 03:53:25 pm
FYI: https://sourceforge.net/p/codeblocks/tickets/481/