Patch to fix Crash when SDCC Static Library is compiled. See thread http://forums.codeblocks.org/index.php/topic,10748.msg73648.html#msg73648
Definitely stops the crash; but, I am not sure a valid Static Lib is created. squalyl, confirmed it fixes the issue and a good static Library is created.
Tim S
Index: src/plugins/compilergcc/compilerSDCC.cpp
===================================================================
--- src/plugins/compilergcc/compilerSDCC.cpp (revision 5679)
+++ src/plugins/compilergcc/compilerSDCC.cpp (working copy)
@@ -138,7 +138,7 @@
m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $options $link_options $libs $link_objects")));
m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $options $link_options $libs $link_objects")));
- //m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r $static_output $link_objects\n\tranlib $exe_output")));
+ m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r $static_output $link_objects")));
m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
LoadDefaultRegExArray();
It should partially work.
Should show:
No. It's show:
A = Couldn't find method std::vector <std::basic_string <char, std::char_traits <char> , std::allocator <char> > , [... and so on]
Where A is vector <string>.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <string> A;
A.resize(4);
A[0]="abc";
A[2]="def";
A.push_back("xyz");
return 0;
}
$ g++ --version
i586-alt-linux-g++ (GCC) 4.4.0 20090514 (ALT Linux 4.4.0-alt3)
$ gdb --version
GNU gdb 6.6-alt3 (ALT Linux)
C::B - svn 5678.