(solved) VS Code not seeing symbol definition

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

(solved) VS Code not seeing symbol definition

Postby mzimmers » Sat Nov 13, 2021 12:01 am

Hi all -

My main cmake file looks like this:

Code: Select all

cmake_minimum_required(VERSION 3.13.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
add_definitions(-DESP_PORT)
project(myProject)
It builds fine, but the VS editor doesn't seem to see the definition of "ESP_PORT," and shows errors.

What do I do in order to make this definition visible to the editor?

Thanks...
Last edited by mzimmers on Thu Nov 18, 2021 8:06 pm, edited 1 time in total.

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: VS Code not seeing symbol definition

Postby boarchuz » Sat Nov 13, 2021 12:57 am

See the "defines" item in this example config: https://code.visualstudio.com/docs/cpp/ ... e#_example

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: (solved) VS Code not seeing symbol definition

Postby mzimmers » Thu Nov 18, 2021 8:06 pm

Thanks, boarchuz.

Who is online

Users browsing this forum: No registered users and 27 guests