월 19,800원
5개월 할부 시다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 해결됨삼각형의 실전! CMake 초급
혹시 강의에 나오는 예제 코드를 받을 수 있는건가요?
섹션 2의 모던 CMake 쪽 강의를 듣고 있습니다.제가 놓친거 같은데 강의에서 실행하는 예제 코드 들은 어디서 다운 받을 수 있는건가요?아니면 제가 비슷하게 만들고 테스트를 해야 되는건가요?
- 해결됨삼각형의 실전! CMake 초급
CMake 배포 강의가 CMake 설치 강의랑 똑같아요
마지막 배포 강의가 현재 CMake 설치 강의랑 동일한 파일이 재생이 됩니다하지만, 강의 파일을 받아보면, Cpack 등 다른 강의 파일이라 현재 동영상 강의가 다른 것이 올라와 있는 것 같은데 확인 부탁드립니다. 쉽게 설명해주시는 강의를 해줘서 강의는 잘 듣고 있습니다
- 해결됨삼각형의 실전! CMake 초급
Xcode 빌드시스템 에서 빌드가 잘 되지 않는 문제가 있습니다.
여러가지 조사를 해봤지만 해결되는것이 없어서 도움을 요청해봅니다..일단 Xcode는 설치가 되어 있고, Xcode 버젼은 다음과 같습니다.xcode-select -p > /Applications/Xcode.app/Contents/Developer xcodebuild -version Xcode 15.0.1 Build version 15A507작업 위치는 외장 디스크를 터미널로 접근해서 작업을 했습니다.ShellScript로 CMake 세팅을 했고요bash ~/CMakeInitTemplate.sh Phello-cmake 를 실행하면#!/bin/bash # 명령어 결과물을 변수로 나타내기 CurPath=$(pwd) ProjectName="$1" # 현재 주소를 사용해서 concatenate하기 if [ -z "$ProjectName" ]; then echo "Type ProjectName by argument" echo "Like bash ~/CMakeInitTemplate [ProjectName]" exit 0 fi mkdir "${ProjectName}" cd "${ProjectName}" || exit # 파일이 있는지 없는지 확인하기 # https://co-no.tistory.com/109 # if [ -e "$FILE" ]; then # echo "File Exists" # else # echo "No Matching FIle" # fi # 파일 쓰기 # https://stackoverflow.com/questions/11162406/open-and-write-data-to-text-file-using-bash Create_CMakeLists_Text() { touch CMakeLists.txt echo "# 최소 CMkae버젼 요구사항 명시 cmake_minimum_required(VERSION 3.0.0) # 프로젝트 이름 지정 project(${ProjectName}) # 타겟 프로그램 정의 add_executable(${ProjectName} src/main.cpp) # 조건문 if(BUILD_TESTING) # 메세지 출력 message('Hello Test') endif()" >> CMakeLists.txt } # 인프런 삼각형 GNU 폴더 구조 Set_CMake_FolderStructure() { mkdir bin # 1. 동적 라이브러리와 실행파일 : bin mkdir data # 2. 데이터와 에셋 : data mkdir demo # 3. 데모 : demo mkdir doc # 4. 문서 : doc mkdir include # 5. 헤더파일 : include mkdir lib # 6. 라이브러리 : lib mkdir src # 7. 소스파일 : src touch src/main.cpp mkdir test # 8. 테스트 : test } Create_CMakeLists_Text Set_CMake_FolderStructure cd ../ CMakeLits.txt 는 처음에 다음과 같이 실습을 따라했습니다.다만, 저만의 프로젝트 이름을 설정하기위해 "Phello-cmake"로 이름을 지었구요.# 최소 CMkae버젼 요구사항 명시 cmake_minimum_required(VERSION 3.0.0...3.27.7) # 프로젝트 이름 지정 project(Phello-cmake) # 타겟 프로그램 정의 add_executable(Phello-cmake src/main.cpp) # 조건문 if(BUILD_TESTING) # 메세지 출력 message('Hello Test') endif() cmake -G "Unix Makefiles" -B build-make와 같이Makefiles를 빌드시스템을 명시하고 빌드할때는 문제가 없이build-make 파일이 잘 생깁니다.다만,cmake -G "Xcode" -B build-xcode 실행할때 다음과 같은cmake -G "Xcode" -B build-xcode -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:6 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:6 (project): No CMAKE_CXX_COMPILER could be found. -- Configuring incomplete, errors occurred! 이 에러를 봤을때, 컴파일러를 명시하면 되겠다 생각하고다음과 같이 컴파일러를 명시했습니다.# 최소 CMkae버젼 요구사항 명시 cmake_minimum_required(VERSION 3.0.0...3.27.7) # set(CMAKE_C_COMPILER /usr/bin/clang) set(CMAKE_CXX_COMPILER /usr/bin/clang++) # 프로젝트 이름 지정 project(Phello-cmake) # 타겟 프로그램 정의 add_executable(Phello-cmake src/main.cpp) # 조건문 if(BUILD_TESTING) # 메세지 출력 message('Hello Test') endif() 그러나 다음과 같이Check for working C compiler: /usr/bin/clang - brokenThe C compiler"/usr/bin/clang"is not able to compile a simple test program.과 같은 이유로 실습진행이 막혔습니다.cmake -G "Xcode" -B build-xcode -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang - broken CMake Error at /opt/homebrew/Cellar/cmake/3.27.7/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler "/usr/bin/clang" is not able to compile a simple test program. It fails with the following output: Change Dir: '/Volumes/Transcend/개발 자료/Markdown/SelfStudy/Doc/Cpp/CMake/실습/Phello-cmake/build-xcode/CMakeFiles/CMakeScratch/TryCompile-Qo6pMj' Run Build Command(s): /usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_2733e -parallelizeTargets -configuration Debug -hideShellScriptEnvironment Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_2733e -parallelizeTargets -configuration Debug -hideShellScriptEnvironment User defaults from command line: HideShellScriptEnvironment = YES IDEPackageSupportUseBuiltinSCM = YES 2023-10-27 13:21:07.547 xcodebuild[8028:99890] Writing error result bundle to /var/folders/yc/p3zthqjj70b5_p976b68c9rr0000gn/T/ResultBundle_2023-27-10_13-21-0007.xcresult xcodebuild: error: 'CMAKE_TRY_COMPILE.xcodeproj' does not exist. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:10 (project) 그래서 두번쨰로 환경변수를 설정했습니다./* ~/.zshrc */ : export CC=/usr/bin/clang export CXX=/usr/bin/clang++ autoload -Uz compinit && compinit bindkey '^I' complete-word zstyle -e ':completion:*' command-path 'reply=( "$PWD/bin" "$path[@]" )' typeset -U PATH path : 그럼에도 여전히 빌드가 되지 않고, 마지막으로 Xcode SDK 경로 설정까지 해/* ~/.zshrc */ export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) 추가를 해봤지만 작동이 되지 않았습니다..어떻게 해야 해결이 될지 알려주실 수 있을까요? ㅠㅠ
- 해결됨삼각형의 실전! CMake 초급
CMake 심화 - CMake 설치 실습 관련 문제
안녕하세요. 강의 정말 잘 들었습니다. 완강하고 나서 cmake 개념이 잘 잡혀서 실무에 도움이 많이 될 것 같습니다.실습을 수행하던 도중 install 실습에서 문제가 발생했는데요. 강의는 "CMake 심화 - CMake 설치" 입니다.강의 영상과 동일한 명령어를 수행했음에도 installing이 수행되지 않는 증상입니다.cd installing mkdir build cd build cmake ..위 작업은 정상적으로 수행이 잘 되고, 아래와 같은 출력결과가 나옵니다.-- The C compiler identification is AppleClang 14.0.3.14030022 -- The CXX compiler identification is AppleClang 14.0.3.14030022 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- BINDIR: bin -- LIBDIR: lib -- INCLUDEDIR: include -- DATAROOTDIR: share -- Configuring done (0.8s) -- Generating done (0.0s) -- Build files have been written to: /Users/user/wd/practice-cmake/installing/build 이후 강의에서는 아래 명령어를 수행하는데, install이 수행되는 것이 아닌 다시 cmake configure와 generate 과정이 수행되는 것으로 보입니다.cmake .. --install-prefix=/Users/user/wd/practice-cmake/installing/build/install다음과 같은 출력결과가 나옵니다.-- BINDIR: bin -- LIBDIR: lib -- INCLUDEDIR: include -- DATAROOTDIR: share -- Configuring done (0.1s) -- Generating done (0.0s) -- Build files have been written to: /Users/user/wd/practice-cmake/installing/build MacOS와 Ubuntu 환경에서 모두 동일하게 문제가 발생했는데요, 제가 어떤 부분을 빠뜨린 것인지 궁금합니다.감사합니다.
- 해결됨삼각형의 실전! CMake 초급
CMakeCache.txt에서 ON과 1은 같은건가요?
1이 true이듯 캐시파일에서 1이 ON과 같은건가요?
- 해결됨삼각형의 실전! CMake 초급
CMake CLI 사용법 강의에서 빌드 명령어를 입력해도 빌드가 안되네요..
현재 CMake CLI 사용법 강의 수강 중입니다. 4분 12초부터 나오는 Cmake 명령어를 입력해서 빌드하는 부분에서 막히고 있습니다. 1.입력한 명령어moonhyung@DESKTOP-Q9M8J51:/mnt/c/ClionProjects/Practice-cmake.git/hello-cmake$ cmake -B build .2.에러 메세지CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):Compatibility with CMake < 3.5 will be removed from a future version ofCMake.Update the VERSION argument <min> value or use a ...<max> suffix to tellCMake that the project does not need compatibility with older versions.CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.CMake Error: CMAKE_C_COMPILER not set, after EnableLanguageCMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage-- Configuring incomplete, errors occurred! 3.원인으로 예상하는 부분 & 확인한 부분- C컴파일러를 Cmake가 찾지 못해서 발생하는 에러라고 생각해서 아래 사항들을 확인해 보았습니다.3-1) gcc 컴파일러 버전 확인 & Cmake 버전Gcc 컴파일러 버전Cmake 버전 3-2)환경변수 경로 확인 및 추가CC=/usr/bin/gccCXX=/usr/bin/g++