Bug #10696 2007-03-21 13:43

exhu

wrong command line for compiling without build

When I try to compile only one file from the project (Menu "Build/Compile current file", then only the default include directory is passed to the compiler and none of the project build options, including the path for generated object files, e.g.

mingw32-g++.exe -IC:\MinGW\include -c ..\WidgetLib\WLFontBitmapContainer.cpp -o ..\WidgetLib\WLFontBitmapContainer.o

Instead of

mingw32-g++.exe -W -O0 -DSIMULATOR -DWIN32 -D_DEBUG -D_LIB -I"..\..\UI Widgets\xmod" -I"..\..\UI Widgets\widgets\src" -IC:\sdk\v315\inc -I"..\..\UI Widgets\widgets\inc" -I..\..\gPlayer\inc\ -I..\Controls -I..\Core -I..\Registry -I..\MemManager -IC:\MinGW\include -c ..\WidgetLib\FontBitmapContainer.cpp -o ..\WidgetLib\Debug\FontBitmapContainer.o

Category
Compiler
Group
 
Status
Closed
Close date
2007-03-22 14:35
Assigned to
biplab
biplab 2007-03-21 15:49

Can't reproduce this in latest nightly (Tested with Rev 3732). Please post your nightly revision no, OS. If you're using an older release (RC2) or nightly, please upgrade to a latest nightly.

exhu 2007-03-21 16:00

WinXP SP2, rev3730 (19 march nightly), unicode version.

I have imported a Visual Studio .NET 2003 .sln file and then have chosen a file from one of the projects in the workspace. While it builds with proper arguments to the G++ it doesn't pass anything (according to the logs) to the G++ except for the default parameters if and only if I order to compile the single file (CTRL-SHIFT-F9 or via the main menu) and not the whole project via the build command.

biplab 2007-03-21 16:12

I followed your test case. I imported one solution file. Then I used Compile current file. And it works for me. Have look at the following line.

[100.0%] mingw32-g++.exe -DWIN32 -D__WIN32__ -D__WXMSW__ -D__WXDEBUG__ -DWXUSINGDLL -DUNICODE -D_DEBUG -D_WINDOWS -DHPDF_DLL -W -O0 -IC:\wxMSW-2.8.2-RC1\lib\vc_dll\mswud -IC:\wxMSW-2.8.2-RC1\include -IC:\Required\Dev\libharu-2.0.8\include -IC:\MinGW\include -c C:\Projects\IntzeTank\IntzeTank\AboutDialog.cpp -o Debug_Win32\AboutDialog.o

So I can't reproduce it. I'm using WinXP SP2+Rev 3732.

exhu 2007-03-22 09:22

The nightly build I tested is the latest accessible for download.

But I am sure the bug persists. I have tried some more situations and found out that

1) a MS VS 2003 solution file for several .vcproj projects is needed with interdependencies (i.e. there are several projects each of them depends on the other etc.)

2) One of the projects is marked as active (displayed in bold font in C::B manager workspace)

3) The file to compile (a .cpp file) must be from non-active project

Now the bug will not reproduce if you do one of the following:

1) Right click on the file in the workspace manager tool window and select (Build file)

2) Make the project with the file an active one

i.e. after doing 1) or 2) the "compile current file" will do well.

biplab 2007-03-22 13:38

Bug confirmed. Thanks for providing me steps to reproduce it.

I'll try to fix it soon.

biplab 2007-03-22 14:35

This bug is now fixed in HEAD.

Thank you for reporting it.