Author Topic: Multiple compilers per Project?  (Read 4465 times)

Offline fabrizio.benedetti

  • Multiple posting newcomer
  • *
  • Posts: 25
Multiple compilers per Project?
« on: July 07, 2008, 03:11:41 pm »
Hi all,

  not sure if this could belong here: I am a C::B newbie, I set down and built it from sources after getting an exception when trying to use the MSVC compiler in my projects. While debugging C::B I discovered the exception rises from compiler.cpp(252):

Code
void Compiler::GenerateCommandLine(wxString& macro, (etc))
{
    if (!m_pGenerator)
        cbThrow(_T("Compiler::Init() not called or generator invalid!"));

Actually, my project has 4 targets: 2 of them build a debug and a release version using GCC, the remaining 2 build a debug and a release version using MSVC. Seems to me that this is not currently supported, as only one Compiler object is actually Init()ialized (and indeed, a MSVC-only project works)... am I right? Is there any workaround - aside from creating 2 different projects? Is this one of the changes going on in the Compiler Framework redesign?

  Cheers,
    Fabrizio

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Multiple compilers per Project?
« Reply #1 on: July 07, 2008, 03:34:11 pm »
I have projects (static libs) that are build with 8 different compilers. Works fine for me.
Target 1 : Gnu(debug)
Target 2 : Gnu(release)
Target 3 : MsVC(debug)
Target 4 : MsVC(release)
Target 5 : Digital mars
Target 6 : Open Watcom
Target 7 : Borland
Target 8 : GnuArm(debug)
Target 9 : GnuArm(release)
Target 10 : windriver compiler
Target 11 : Ti-compiler(debug)
Target 12 : Ti-compiler(release)