News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How can I biuld codeblocks with codeblocks on linux

Started by ccsee, May 08, 2009, 06:24:20 AM

Previous topic - Next topic

ccsee

I have downloaded both codeblocks8.0.2 source code and release version.
And i use codeblocks to open CodeBlocks-unix.cbp which is in src directory.
When tried to compile it, I got errors below. Forget the irrecognized characters,they are not english.

/home/ccsee/develop/wxGTK-2.8.10/include/wx/defs.h|42|閿欒锛?#error "No Target! You should use wx-config program for compilation flags!"|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/cursor.h|40|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪dkCursor鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/cursor.h|40|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/app.h|55|閿欒锛?鈥榞uint鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/app.h|65|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪dkVisual鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/app.h|65|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/colour.h|26|閿欒锛?expected 鈥?鈥?or 鈥?..鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/colour.h|26|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪dkColor鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/colour.h|42|閿欒锛?鈥楪dkColormap鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/colour.h|45|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪dkColor鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/colour.h|45|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/region.h|59|閿欒锛?expected `)' before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/region.h|61|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪dkRegion鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/region.h|61|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h|1133|閿欒锛?鈥榃XWidget鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h|1135|閿欒锛?鈥榃XWidget鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h|1293|閿欒锛?瀛楁鈥榤_palette鈥欑被鍨嬩笉瀹屽叏|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h||In member function 鈥榳xPalette wxWindowBase::GetPalette() const鈥?|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h|1142|閿欒锛?杩斿洖鍊肩被鍨嬧€榮truct wxPalette鈥欎笉瀹屽叏|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/window.h|1142|閿欒锛?鈥榤_palette鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected initializer before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?typedef鈥楥MPFUNC_wxArraywxArrayGdkWindows鈥欒鍒濆鍖?鏀圭敤 __typeof__)|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榩Item1鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榩Item2鈥欏湪姝や綔鐢ㄥ煙涓皻鏈0鏄巪
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€榑wxArraywxArrayGdkWindows鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected `;' before 鈥榑wxArraywxArrayGdkWindows鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€榑wxArraywxArrayGdkWindows鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected `;' before 鈥榑wxArraywxArrayGdkWindows鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€榑wxArraywxArrayGdkWindows鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?expected `;' before 鈥榠nt鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥楥MPFUNC_wxArraywxArrayGdkWindows鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|19|閿欒锛?鈥榑wxArraywxArrayGdkWindows鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|132|閿欒锛?鈥榃XWidget鈥欐病鏈夊懡鍚嶄竴涓被鍨媩
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|171|閿欒锛?ISO C++ 涓嶅厑璁稿0鏄庢棤绫诲瀷鐨勨€楪tkWidget鈥檤
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|171|閿欒锛?鈥楪tkWidget鈥欏0鏄庝负鈥榲irtual鈥檉ield|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|171|閿欒锛?expected 鈥?鈥?before 鈥?鈥?token|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|172|閿欒锛?鈥楪tkWidget鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|186|閿欒锛?鈥楪tkWidget鈥欐湭澹版槑|
/home/ccsee/develop/wxGTK-2.8.10/include/wx/gtk/window.h|187|閿欒锛?鈥楪tkWidget鈥欐湭澹版槑|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

ollydbg

Please use english language, so that people can understand the compiler output.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ccsee

mainly error  "No Target! You should use wx-config program for compilation flags!"


The error is caused by wxWidget.
What can I do?

MortenMacFly

#3
Quote from: ccsee on May 08, 2009, 07:48:26 AM
What can I do?
Ask in a wxWidgets forum?

If I look into def.h (on windows) I see:

/*  Make sure the environment is set correctly */
#   if defined(__WXMSW__) && defined(__X__)
#       error "Target can't be both X and Windows"
#   elif defined(__WXMSW__) && defined(__PALMOS__)
#       error "Target can't be both PalmOS and Windows"
#   elif !defined(__WXMOTIF__) && \
         !defined(__WXMSW__)   && \
         !defined(__WXPALMOS__)&& \
         !defined(__WXGTK__)   && \
         !defined(__WXPM__)    && \
         !defined(__WXOSX_CARBON__)   && \
         !defined(__WXOSX_COCOA__)   && \
         !defined(__WXOSX_IPHONE__)   && \
         !defined(__WXCOCOA__) && \
         !defined(__X__)       && \
         !defined(__WXMGL__)   && \
         !defined(__WXDFB__)   && \
         !defined(__WXX11__)   && \
          wxUSE_GUI
#       ifdef __UNIX__
#           error "No Target! You should use wx-config program for compilation flags!"
#       else /*  !Unix */
#           error "No Target! You should use supplied makefiles for compilation!"
#       endif /*  Unix/!Unix */
#   endif
#endif /*__cplusplus*/

So you see what causes the error... probably (I don't have wxGTK on Windows).

In addition: Without the compilation command (thus full compile log) we can't help you much. See my sig on how to enable full compiler logging and post again the full log.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ccsee

Thank you for your reply!
        I tried to build codeblocks in the terminal.This time, i successed.
        But  How can I build codeblocks with codeblocks on linux?

MortenMacFly

Quote from: ccsee on May 11, 2009, 03:32:24 AM
        But  How can I build codeblocks with codeblocks on linux?
Open the unix workspace file and hit compile. In addition you might want to open the (unix) plugins workspace file and hit compile, too.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

After compiling "CodeBlocks-unix.cbp" and (if wanted) "ContribPlugins-unix.workspace", you have to run "./update" from the commandline (it's in the same directory as the main project/workspace-files), even if you want to start C::B from inside C::B, because otherwise you are missing some resource-files.

ccsee

Successly build.I think that it works correctly  after "apt-get update" .
Thank you!

oBFusCATed

Hello,
How can I debug the code-completion plugin inside C::B?
I've remove the stripping from the update script,
added -g to the code-completion target,
rebuild it
and executed the update script again.

But I still can't debug it?
If I debug code from the sdk(inside cbeditor.cpp) it works.

Here is one of the error messages:
No line 784 in file "/home/obfuscated/projects/codeblocks/brances/wxfnb_to_wxaui/src/plugins/codecompletion/parser/parser.cpp".
(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!]

ollydbg

Quote from: oBFusCATed on May 29, 2009, 06:55:10 PM
Hello,
How can I debug the code-completion plugin inside C::B?
I've remove the stripping from the update script,
added -g to the code-completion target,
rebuild it
and executed the update script again.

But I still can't debug it?
If I debug code from the sdk(inside cbeditor.cpp) it works.

Here is one of the error messages:
No line 784 in file "/home/obfuscated/projects/codeblocks/brances/wxfnb_to_wxaui/src/plugins/codecompletion/parser/parser.cpp".

For me, I just log out some thing to "Debug log" panel. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

(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!]

ollydbg

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

oBFusCATed

DebugLog crashed too :(

I've taken a look at the code and I think the crash is caused by a race condition.
I could not find any thread safety protection mechanisms for the logging class.

There are ::temp_string and ::newline_string which are global.
I've replaced them with local variables, but again got a crash, this time it was AppendText.
Do you know if this method can be called from two threads simultaneously?
I've added a wxMutex, but still got the crash
(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!]

ollydbg

In Windows, I didn't encounter any crash. I'm not sure this DebugLog can be called from different thread, but it seems it can. :D

You need a more sophisticated dev to tell you the details. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

It might be something different in wxGTK, than wxMSW (or its proper name). So you are lucky.

Do someone now if I can disable the precompiled header?
I'm 100% sure that it is the cause of the broken debugging and strange error messages that I receive:


In file included from /home/obfuscated/projects/codeblocks/brances/wxfnb_to_wxaui/src/include/sdk_precomp.h:10:
include/editorbase.h: In member function 'wxArrayString Parser::FindFileInIncludeDirs(const wxString&, bool)':
include/editorbase.h:1092: error: '_1' was not declared in this scope
(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!]