Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
sdk\compiler.cpp
(1/1)
sethjackson:
Ok I was checking this bug.
http://developer.berlios.de/bugs/?func=detailbug&bug_id=6911&group_id=5358
I have Version 1.0 revision 2278 (gcc 3.4.4 Windows/unicode, build: Mar 30 2006 13:09:26)
Now if I do what he says C::B throws then crashes....
So here is what I did. My default compiler is GCC.
1. Settings -> Compiler and debugger.
2. Create a copy of GNU GCC Compiler.
3. Select GNU GCC Compiler (not the Copy of GNU GCC Compiler)
4. Create another copy of GCC.
5. C::B throws, then crashes.
Why? I would fix, but I don't know how. :(
Oh and this is where it throws.
--- Code: (cpp) ---// check for unique ID
if (!IsUniqueID(m_ID))
cbThrow(_T("Compiler ID already exists for ") + m_Name);
--- End code ---
MortenMacFly:
--- Quote from: sethjackson on March 30, 2006, 09:17:28 pm ---Why? I would fix, but I don't know how. :(
--- End quote ---
It has to to with the copy constructor "Compiler::Compiler(const Compiler& other)" . If you change the line 67 in compiler .cpp from:
--- Code: ---m_Name = _("Copy of ") + other.m_Name;
--- End code ---
to something like:
--- Code: ---m_Name = other.m_Name + m_CompilerIDs.Count();
--- End code ---
It should always work correctly since m_CompilerIDs will grow in size each time a compiler is added. Unicode should be taken care of, so maybe a Print("%d"...) has to be used for the integer. Anyway: This is not really good because suddenly the compiler ID is dependend the order how I add "copies of compilers".
But maybe mandrav has a better solution?
With regards, Morten.
mandrav:
Fixed, thanks.
sethjackson:
--- Quote from: mandrav on March 31, 2006, 11:38:35 am ---Fixed, thanks.
--- End quote ---
8)
Navigation
[0] Message Index
Go to full version