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.
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
What does the other devs think about it ?
In fact this was (and is) a bit confusing for me, too. Hence I can disable PCH if I do the steps as I described somewhere else in this forum.
But a checkbox might really be more convenient.
In addition I have modified the code in compilerMINGWgenerator.cpp like this:
Index: src/plugins/compilergcc/compilerMINGWgenerator.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGWgenerator.cpp (revision 5680)
+++ src/plugins/compilergcc/compilerMINGWgenerator.cpp (working copy)
@@ -35,8 +35,9 @@
{
wxString result = CompilerCommandGenerator::SetupIncludeDirs(compiler, target);
m_VerStr = compiler->GetVersionString();
- wxString pch_prepend;
+ wxString pch_prepend = wxEmptyString;
bool IsGcc4 = m_VerStr.Left(1).IsSameAs(_T("4"));
+ bool HasPCH = false; // We don't know yet if there are any header files to be compiled...
// for PCH to work, the very first include dir *must* be the object output dir
// *only* if PCH is generated in the object output dir
@@ -64,6 +65,7 @@
else
pch_prepend << _T("-iquote") << dir << _T(' ');
}
+ HasPCH = true; // there is at least one header file to be compiled
}
}
// for gcc-4.0+, use the following:
@@ -78,9 +80,11 @@
pch_prepend << compiler->GetSwitches().includeDirs << includedDirs[i] << _T(' ');
}
pch_prepend << _T("-I. ");
- result.Prepend(pch_prepend);
}
// add in array
+ if (HasPCH)
+ result.Prepend(pch_prepend);
+
return result;
}
(Not exactly related to that topic but turns off the annoying warnings if there are no PCH files.)
Why do I need to apply this patch, in order to run cb from cb (on linux)
Index: src/main.cpp
===================================================================
--- src/main.cpp (revision 5712)
+++ src/main.cpp (working copy)
@@ -1015,11 +1015,13 @@
m_PluginIDsMap.clear();
PluginManager* m_PluginManager = Manager::Get()->GetPluginManager();
+ int count = 0;
+ wxString path;
- // user paths first
- wxString path = ConfigManager::GetPluginsFolder(false);
- Manager::Get()->GetLogManager()->Log(_("Scanning for plugins in ") + path);
- int count = m_PluginManager->ScanForPlugins(path);
+// // user paths first
+// path = ConfigManager::GetPluginsFolder(false);
+// Manager::Get()->GetLogManager()->Log(_("Scanning for plugins in ") + path);
+// count += m_PluginManager->ScanForPlugins(path);
// global paths
path = ConfigManager::GetPluginsFolder(true);
Without the patch C::B starts but no plugins are loaded...
Here it is
Scanning for lexers in /home/obfuscated/projects/codeblocks/brances/codecompletion_refactoring/src/devel/share/codeblocks/lexers/...
Found 41 lexers
Loading lexer_haskell
Loading lexer_f77
Loading lexer_properties
Loading lexer_ada
Loading lexer_latex
Loading lexer_OgreCompositor
Loading lexer_rc
Loading lexer_xml
Loading lexer_OgreMaterial
Loading lexer_glsl
Loading lexer_gm
Loading lexer_vbscript
Loading lexer_postscript
Loading lexer_angelscript
Loading lexer_vhdl
Loading lexer_html
Loading lexer_squirrel
Loading lexer_d
Loading lexer_lua
Loading lexer_perl
Loading lexer_smalltalk
Loading lexer_prg
Loading lexer_matlab
Loading lexer_fortran
Loading lexer_batch
Loading lexer_ruby
Loading lexer_css
Loading lexer_lisp
Loading lexer_caml
Loading lexer_bash
Loading lexer_diff
Loading lexer_hitasm
Loading lexer_cg
Loading lexer_make
Loading lexer_cpp
Loading lexer_sql
Loading lexer_masm
Loading lexer_nsis
Loading lexer_pascal
Loading lexer_verilog
Loading lexer_python
Configured 0 tools
Scanning for plugins in /home/obfuscated/.codeblocks/share/codeblocks/plugins
Plugin resource not found: cbMakefileGen.zip
Loaded 1 plugins
Scanning for plugins in /plugins
Loading: