Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
I am the one who wrote that MSVC configuration document.

I have been using MSVC with Code::Blocks since Visual Studio 2005 and now using Visual Studio 2019. The idea with the global variables is that it makes it possible to isolate the C::B project file from a particular MSVC version (to some degree) and also allow using MSVC Professional vs. Free editions on different computers without modifying the C::B project file.

If your project is still compiling with gcc it is likely your project compiler is declared as "gcc".

What I do is to create a generic MSVC compiler called "msvc" as described, and then use the "msvc" compiler in the projects. Btw. I also use a custom project file generator that simplifies this, it runs as a separate tool although it could have been made as a C::B plugin probably. It creates msvc and gcc build targets so I can build on Windows using msvc and gcc on linux
It uses the UserTemplates folder to generate projects of different kinds by simple text search/replace

I have just posted a patch in ticket 1146, but I don't know if/when it will be added.

I dont know about the next release, but if you are using Windows you can use the last nightly.
Using Code::Blocks / Re: Not coherent highlighting in Code::Blocks
« Last post by jalcazo on Today at 12:42:46 pm »
Thank you. But it will be added for next Code::Blocks version by default?

BTW, when is that scheduled? There' somewhere I can subscribe to be warned when next Code::Blocks version launches? (mailing list or something).
It is missing in the default syntax highlighting set. You can add that and make_unique_for_overwrite:

Go to Settings -> Editor -> Syntax highlighting
In "Sytnax highlighting for" select C/C++
Click on Keywords
Select set 2
Insert make_unique and make_unique_for_overwrite in alphabetical order
Close settings
Thanks for the historical helpdesk!

I followed SmittenJKittens advice and found the setting that was directing CodeBlocks to the wrong path.

settings>Compiler>ToolChainExecutables and click the auto-detect button.

/* Disclaimer: this is not my circus..... */

Using Code::Blocks / Not coherent highlighting in Code::Blocks
« Last post by jalcazo on Today at 11:16:58 am »
Hi, when using smart pointers with Code::Blocks and C++ you see that make_shared is highlighted in bold green:

However make_unique is not highlighted at all:

Nevertheless shared_ptr and unique_ptr are correctly highlighted:

As you can see:

Why is this happening? unique pointers and shared pointers are "equal" in importance, no?
Using Code::Blocks / Re: howto use clang-tidy in code::blocks
« Last post by jalcazo on Today at 11:09:09 am »
Hi again blauzahn. Thanks for your answer, your help, your time and your patience.

The project structure is like this:

Is there where the file goes? It has no extension, right? I created a new empty file and added only to the build option "Clang Tidy".

The contents of the file are the ones you provided:


## disable all, then enable one check only:
Checks: '-*,clang-analyzer-core.NullDereference'

# Checks: '-*,modernize-use-nullptr'
# Checks: '-*,cppcoreguidelines-special-member-functions'

## disable all,then enable 2 checks:
# Checks: '-*,modernize-use-nullptr,readability-identifier-naming'

## enable all, then disable unwanted group and a single check:
# Checks: '*,-clang-analyzer-alpha*,-llvm-header-guard'

HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false

  - key:             modernize-use-nullptr.NullMacros
    value:           'NULL'
  - key:             readability-identifier-naming.PrivateMemberCase
    value:           aNy_CasE
  - key:             readability-identifier-naming.MemberPrefix
    value:           'm_'

I tried it with or without "..." at the end (I don't understand if this is necessary).

Every time it tells the error YAML error: not a mapping, as seen in the attached log:

When you tell me "Then create a new one (see docs howto)." I don't understand what you are saying to me exactly. Please expand on this point, I don't know where is "docs howto".

About -Werror I looked it and it's not checked.

Clang-tidy version:

H:\morgana>clang-tidy --version
  LLVM version 11.0.0
  Optimized build.
  Default target: i686-pc-windows-msvc
  Host CPU: haswell

Finally, removing the file .clang-tidy alltogether produces the same YAML errors seen in the log.txt attached.
Development / Re: Speedup GDB debugging
« Last post by Miguel Gimenez on Today at 10:21:29 am »
I have just created ticket 1145 fixing the EnvVars plugin
Nightly builds / Re: The 10 October 2021 build (12535) is out.
« Last post by jeRRy on Today at 08:18:55 am »

I had the same problem with shift-tab on 2 pc.
My solution on Windows was:
Close C::B,
delete (or rename) the file default.cbKeyBinder20.conf in C:\Users\username\AppData\Roaming\Code Blocks,
start C::B
C::B creates a new file and it's work

Sorry, my english is ...  :o  :)

Thank you for clarifying the WIndows SDK versionning.

It's interesting to know gcc has a partial SDk implementation, where can I download such SDK. Is it in the MinGW installer?
Pages: [1] 2 3 4 5 6 ... 10