Author Topic: compiler flag settings of wxWidgets project wizzard incompatible!  (Read 1765 times)

Offline myztmy

  • Multiple posting newcomer
  • *
  • Posts: 11
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:
Code
||=== 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:
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



« Last Edit: June 09, 2023, 02:54:13 pm by myztmy »