Author Topic: multiple compilers in single project  (Read 4706 times)

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
multiple compilers in single project
« on: January 26, 2007, 06:13:25 pm »
Hello, all

First of all, thanks to the C::B developement team for creating such
an outstanding IDE.  C::B has become my favorite dev tool (right after
the keyboard!).

I have a problem that is probably a simple misunderstanding on my part ...

I have a single project, using multiple files.  Some of these files are C++
source, some are FORTRAN source.

I defined 2 compilers, named "MinGW C++" and "MinGW FORTRAN".  While
they use the same MinGW GCC core compiler (using the front-ends "g++" and
"g77"), they have very different default options selected and (in the case of the
FORTRAN compiler) a list of "Other Options" entered.

I could use the single "gcc" compiler to compile both types of files, but in
this case it makes a lot of sense to compile the C++ files with the "g++" front-end
and the FORTRAN files with the "g77" front-end. (I then use g++ to link them
all into one executable).

The default compiler is the C++ compiler.

So, I select a FORTRAN file from the project-management list, right-click the file,
select "Properties", and change the compiler to the FORTRAN compiler.

However, the compiler selection for that file does not "stick".  When I select
that same file again, and check the properties, the compiler selection is
back to the default C++ compiler.

Is this the way it is suppoed to work?  And if so, why bother having a drop-down
list of compilers in the file properties box?

I'm using WinXP, with C::B build from Jul 5, 2006 rev 2687.

Thanks,
Ron

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: multiple compilers in single project
« Reply #1 on: January 26, 2007, 07:06:19 pm »
Quote
The default compiler is the C++ compiler.

So, I select a FORTRAN file from the project-management list, right-click the file,
select "Properties", and change the compiler to the FORTRAN compiler.

However, the compiler selection for that file does not "stick".  When I select
that same file again, and check the properties, the compiler selection is
back to the default C++ compiler.

Is this the way it is suppoed to work?  And if so, why bother having a drop-down
list of compilers in the file properties box?

This sounds like a bug, probably introduced with the last project file update. Give us some time to have a look...
Be patient!
This bug will be fixed soon...

Offline eoneuk

  • Multiple posting newcomer
  • *
  • Posts: 18
    • http://
Re: multiple compilers in single project
« Reply #2 on: April 27, 2007, 01:52:16 am »
I am having a similar problem with Build April 24, 2007, svn 3885 on Windows XP.

Is there a work-around, or is there another setting that has to be made?

Thanks for any help in this matter.

Ed

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: multiple compilers in single project
« Reply #3 on: April 28, 2007, 07:57:36 pm »
The problem persists, but I made a simplistic work-around.

I took all the FORTRAN files and made a seperate project, that builds a static library.  In this way I can use a single compiler for all the files. I then link this static library into my main project, and end up with the executable I want.  It's a little more effort, and non-intuitive, but it works.

-- Ringo

Offline huhlig

  • Single posting newcomer
  • *
  • Posts: 4
Re: multiple compilers in single project
« Reply #4 on: April 25, 2008, 09:18:01 am »
Has this been fixed, I am attempting to mix C and D and having the same issue.