Menu

#679 Right-click on <header.h>: CB looks in GCC path first regardless of chosen compiler

Undefined
open
nobody
Bug_Report
2018-08-17
2018-05-01
Jannick
No

How to reproduce:

  • create a new project with, say, standard main file
  • change compiler of target Debug to any compiler other than GCC
  • right-click on #include <stdlib.h> in main.c

Then header file of chosen compiler (or rather of the compiler associated to the active target) is expected to be opened, but header in path of GCC is opened

Using CB svn11246 (nightly build) on Win10.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2018-05-14

    What is the other compiler?

     
    • Jannick

      Jannick - 2018-05-14

      x86_64-w64-mingw32-gcc/g++.exe.

       
      • Teodor Petrov

        Teodor Petrov - 2018-05-14

        This is too generic. Version number, link to download, etc, please...

         
        • Jannick

          Jannick - 2018-05-15
          • MSYS2: https://www.msys2.org/ - rewrite of MSYS with cygwin-like shell
          • x86_64-w64-mingw32-gcc.exe (Rev2, Built by MSYS2 project) 7.3.0

          Probably relevant here: The nice thing about the msys2 shell is that paths are displayed as, e.g., /c/temp (for C:/temp), while cygwin sticks to /cygdrive/c/temp. Both shells ignore single backslashs, in general, since backslashs are to be escaped by a backslash.

          If any piece of info is missing, I am happy to share.

           
  • ollydbg

    ollydbg - 2018-08-11
    • labels: --> CodeCompletion
     
  • ollydbg

    ollydbg - 2018-08-17

    create a new project with, say, standard main file
    change compiler of target Debug to any compiler other than GCC

    The reason here is:
    When you create the project, the default compiler is GCC, and after your create the project, CodeCompletion use the Compiler(GCC) to fetch all the compiler build-in search paths, so when you switch the compiler, it won't change the build-in search paths.

    I think you can save the project after changing the compiler, and then close the project. Then reopen the project, this time, CodeCompletion will use the new compiler set to fetch the include search paths.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.