News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

multiple compilers in single project

Started by rcoll, January 26, 2007, 06:13:25 PM

Previous topic - Next topic

rcoll

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

mandrav

QuoteThe 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...

eoneuk

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

rcoll

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

huhlig

Has this been fixed, I am attempting to mix C and D and having the same issue.