News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

compiler flag settings of wxWidgets project wizzard incompatible!

Started by myztmy, June 09, 2023, 02:47:21 PM

Previous topic - Next topic

myztmy

C::B is latest nightly builds (svn 13311), compiler is winlibs-x86_64-mcf-seh-gcc-13.1.0-mingw-w64ucrt-11.0.0-r1.

when I click  menu   " file->new->project...->wxWidgets project"  using wxWidgets project wizzard  to create a  simple wxWidgets gui  project,  build  it I receive  following errors:
||=== Build: Debug in HelloWxWidgets (compiler: GNU GCC Compiler) ===|
{standard input}|22729|Error: junk at end of line, first unrecognized character is `.'|
{standard input}|37534|Error: junk at end of line, first unrecognized character is `.'|
{standard input}|44118|Error: junk at end of line, first unrecognized character is `.'|
{standard input}|48427|Error: junk at end of line, first unrecognized character is `.'|
{standard input}|52616|Error: junk at end of line, first unrecognized character is `.'|
{standard input}|85397|Error: junk at end of line, first unrecognized character is `.'|
||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 40 second(s)) ===|


It is assembler errors ,and I check the project build options and notice  wxWidgets project wizzard  auto add  a compiler flag "-pipe" to it  ,  remove that flag and rebuild the project  successfully.

open wizzard.script I find such code:
        else if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc*")))
        {
            project.AddCompilerOption(_T("-pipe"));
            project.AddCompilerOption(_T("-mthreads"));
            project.AddLinkerOption(_T("-mthreads"));
            project.AddCompilerOption(_T("-D__GNUWIN32__"));
            project.AddCompilerOption(_T("-D__WXMSW__"));
            if (IsDLL)
                project.AddCompilerOption(_T("-DWXUSINGDLL"));
            if (IsUnicode)
                project.AddCompilerOption(_T("-DwxUSE_UNICODE"));
        }


I don't understand why the author added the "-pipe" flag to gcc compiler on Windows but not add to gcc compiler on non Windows platforms  .Use pipes rather than temporary files for communication between the various  stages of compilation may work well on linux or unix, but maybe incompatible in windows.

I don't know which section of the forum is suitable for posting this content , just send it here .

Just a reminder for users who encounter this issue.

Regards