Bug #10799 2007-04-03 10:07

julienlecomte

compile current file fails with multiple projects in a works

compile current file fails with multiple projects in a workspace:

- use a workspace with 2 projects (each with a different compiler in my case: mingw & msvc 2005)

- compile a project (the second one in my case with msvc 2005) with a file open

- activate first project (mingw)

- compile current file

--> it switchs back to second project and other compiler

Category
Application::WrongBehaviour
Group
 
Status
Closed
Close date
2007-04-05 14:11
Assigned to
biplab
julienlecomte 2007-04-03 12:51

btw, SVN 3805, WinXp, mingw (gcc 3.4.5) built with shared libstdc++.

biplab 2007-04-05 03:51

*Compile current file* compiles the currently *active* file in Editor when it is called from Main Menu. It switches the project to compile properly.

If you want to compile a file from the first project in your case do any one of the following:

1) Open it in Editor and use *Build > Compile current file* menu option.

2) Right click on the file name in Project Manager and click *Build file*.

The behaviour you're seeing is quite correct.

julienlecomte 2007-04-05 08:39

Hum..

Did I forget to mention that the file is part of both projects. The two projects are exactly of same composition, but with different compilers (and different output folders).

So if I open foobar.cxx under project MSVC, compile project, then activate project MINGW, I tend to think that doing a compile current file will compile foobar.cxx as MINGW.

To get the latter desired behavior, I have to "reopen" foobar.cxx but from the MINGW project.

biplab 2007-04-05 14:11

Yes, you've to reopen the file or *build the complete project* or right click on file in *Project Manager* and select *Build file* option.

C::B checks parent of currently opened file if you use compile current file option. This is the default behaviour.

I'm closing this bug report.