User forums > Using Code::Blocks
Some problems with src/associations.cpp and dlgEnvironmentSettings
Der Meister:
I just tried to compile the current svn-version (revision 1477) on linux, but there are some problems:
In revision 1459 the files src/associations.* were added to the projekt and in revision 1464 they were added to the autotools build system. But as these files are (only?) dealing with file assosiations and thus are 100% windows-dependent it is not possible to compile src/associations.cpp on linux (and it would make no sense either). Thus I had to remove src/associations.cpp from src/Makefile.am. The next problem is then that the environment-settings-dialogue uses some functions from src/associations.cpp even on Linux. I don't see much sense in doing so and think that these functions should be disables on linux with an #ifdef __WXMSW__... around them as it is always done in src/app.cpp. (The lines in question should be 79/80 and 122 in the file 'src/environmentsettingsdlg.cpp').
But there is another issue with this dialogue:
XRCCTRL(*this, "txtBatchBuildsCmdLine", wxTextCtrl) seems to return a zero-pointer which makes Code::Blocks crash. According to the file 'src/resources/env_settings.xrc' a text-box-control named "txtBatchBuildsCmdLine" should exist. After removing all lines for "txtBatchBuildsCmdLine" in the constructor of 'EnvironmentSettingsDlg' Code::Blocks displays the dialogue but the tab where the text-box should be placed on is completely missing. I have no idea why this happens but could this explain the problem?
mandrav:
Yes, I haven't done a linux build lately so what you 're saying about associations.* is correct. I 'll fix it a little later.
--- Quote from: Der Meister on December 09, 2005, 03:12:45 pm ---But there is another issue with this dialogue:
XRCCTRL(*this, "txtBatchBuildsCmdLine", wxTextCtrl) seems to return a zero-pointer which makes Code::Blocks crash. According to the file 'src/resources/env_settings.xrc' a text-box-control named "txtBatchBuildsCmdLine" should exist. After removing all lines for "txtBatchBuildsCmdLine" in the constructor of 'EnvironmentSettingsDlg' Code::Blocks displays the dialogue but the tab where the text-box should be placed on is completely missing. I have no idea why this happens but could this explain the problem?
--- End quote ---
Run:
--- Code: ---make clean-zipfiles
make
make install
--- End code ---
so that resource zips get updated.
Resource zips and PCH should be auto-regenerated when needed but I haven't implemented this yet in autotools. I will though...
mandrav:
Associations.* problems should be fixed now (revision 1478).
I haven't built it in linux yet, but it should work.
Der Meister:
Thanks for the tip with 'make clean-zipfiles' - Code::Blocks doens't crash anymore.
But there is still one problem left with your fix: Now 'src/associations.h' is no longer included in 'src/environmentsettingsdlg.cpp' on linux as the functions declared in that header-file are not necessary on linux. But in this header-file the macro 'DEFAULT_BATCH_BUILD_ARGS' is defined, too. And this macro is still used by 'src/environmentsettingsdlg.cpp' in line 57 and thus the result is a compiler error.
I see two reasonable solutions for that:
- Remove the whole file-associations-stuff from the linux-build as it is simply needless on linux.
- Include 'src/associations.h' in 'src/environmentsettingsdlg.cpp' even in the linux build. This header file will define the needed macro and will declare some (unnecessary) functions. Although these functions are not defined anywhere there is no problem because these functions will not get used. This solutions may be some kind of dirty but it is really simple. ;)
Perhaps, there is even a third way: I don't know where the macro 'DEFAULT_BATCH_BUILD_ARGS' is used, but if the file 'src/environmentsettingsdlg.cpp' is the only place then we could just move the macro there.
killerbot:
that macro ? is relatively new : today by Thomas : rev 1474 :
associations.cpp : replace _T("...") with DEFAULT_BATCH_BUILD_ARGS
Navigation
[0] Message Index
[#] Next page
Go to full version