Author Topic: Compiling codeblocks original source code to develop my own customized codeblock  (Read 2305 times)

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
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.
« Last Edit: February 05, 2017, 08:26:15 am by anandamu16 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5711
    • My Best Post
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
I have modify the image and just added the build log for clear visibility.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1273
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
« Last Edit: February 05, 2017, 01:40:01 pm by BlueHazzard »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7145
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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).

Offline headkase

  • Almost regular
  • **
  • Posts: 138
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.

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
I have added the complete build log here:

Code: [Select]

||=== 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9880
The errors have nothing to do with wx. Inspect the source and see what is going on. Probably some macro is not right.
<debugger plugin maintainer>
(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 BlueHazzard

  • Lives here!
  • ****
  • Posts: 1273
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...

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
Sorry for the silly mistake. Pls check the build log here

Code: [Select]

-------------- 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))
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5711
    • My Best Post
Code Snippet from debuggergdb.cpp
Code: [Select]
#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.

« Last Edit: February 06, 2017, 02:30:35 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5711
    • My Best Post
Code: [Select]
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: [Select]
C:\codeblocks_16.01.tar\codeblocks_16.01\codeblocks-16.01.release
Code: [Select]
C:\codeblocks-16.01-1.el7.src\codeblocks-16.01-1.el7.src\codeblocks-16.01svn10695

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

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
I tried to include "tlhelp32.h" also as a precautionary measure, then also error remains the same
Code: [Select]
#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: [Select]

-------------- 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
« Last Edit: February 07, 2017, 06:50:03 am by anandamu16 »

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
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 :(

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 86
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?