vscode 에서 Qt 개발환경을 설정하기 위한 설정 (Ubuntu 20.04) qt cmake

vscode 를 실행한다.

 

 

control + shift + x 

cmake 를 검색하여 CMake, Cmake Tools 를 설치한다.

위 두개만 설치하면 가능한것으로 보임

QtCreator 에서 Gui 프로젝트 생성시 CMake 로 생성하도록 설정 (예제 테스트)

VSCode 에서 해당 프로젝트를 Load 한다.

ctrl + shift + P

CMake : Configure , Build

선택해주면 뭔 화면이 나오면서

c_cpp_properties.json 이 자동생성함

{

"configurations": [

{

"name": "Linux",

"includePath": [

"${workspaceFolder}/**",

"/Tools/QtInstall/5.14.2/gcc_64/include**",

"/Tools/QtInstall/5.14.2/gcc_64/include/QtGui"

],

"defines": [],

"compilerPath": "/usr/bin/g++-9",

"cStandard": "c11",

"cppStandard": "gnu++14",

"intelliSenseMode": "clang-x64",

"forcedInclude": [

"/Tools/QtInstall/5.14.2/gcc_64/include**"

]

}

],

"version": 4

}

F7 빌드 

Run폴더로 가서 벌레그림>  실행할 바이너리를 설정해줘야함

launch.json 파일이 생성된다.

 

{

"version": "0.2.0",

"configurations": [

{

"name": "(gdb) Launch",

"type": "cppdbg",

"request": "launch",

"program": "${workspaceFolder}/build/testQtcmake",

"args": [],

"stopAtEntry": false,

"cwd": "${workspaceFolder}",

"environment": [],

"externalConsole": false,

"MIMode": "gdb",

"setupCommands": [

{

"description": "Enable pretty-printing for gdb",

"text": "-enable-pretty-printing",

"ignoreFailures": true

}

]

}

]

}

 

"program": "${workspaceFolder}/build/testQtcmake",

실행할 프로그램 변경후 > 클릭하면 프로그램이 실행된다.

 

아래는 수행하지 X 

 

include 못잡는 것은 수행하지 못함.죄송..

 

 

 

https://marketplace.visualstudio.com/items?itemName=OralShaneCurtis-6510.launchqtcreator

 

Launch Qt Creator - Visual Studio Marketplace

OverviewQ & ARating & Review launchqtcreator README QtCreator is very useful for certain tasks! When working on Qt projects, there are things I find Qt Creator invaluable for -just too convenient to use anything else (almost). I often use Vislual Studio Co

marketplace.visualstudio.com

ctrl + p 입력후 내용 입력 

https://marketplace.visualstudio.com/items?itemName=OralShaneCurtis-6510.launchqtcreator

'Linux' 카테고리의 다른 글

[Qt5.15] Ubuntu 20.04 한글설정  (0) 2020.05.14
heaptrack  (0) 2020.05.13
Ubuntu 스킨 변경  (0) 2020.05.12
[USB] Ubuntu20.04 USB 이미지 만들기  (0) 2020.05.11

+ Recent posts