c++ - Include Whole Folder Of *.cpp Files In Visual Studio -


i've had problem while , decided ask it. have folder-worth of .cpp files include multiple projects. have put .h , .cpp files 1 directory c:/mycode/ , have added directory "additional include directories" in visual studio. .cpp files, know add of them manually, 1 @ time, use code multiple projects , prefer not spend 10 minutes including each 1 every project make (i make lot of projects.) read here use called wildcard include multiple files of same type accessing project file directly notepad or something, doesn't seem work in case still doesn't recognize functions have defined. have tried making library function definitions in , including way, did not work. prefer against method anyway able edit code in original directory (c:/mycode/) , have affect code projects use it.

so question is, there way make visual studio include .cpp files in folder? have found not seem work.

so question is, there way make visual studio include .cpp files in folder? have found not seem work.

im not expert on matter. read including files wildcard. downside wildcard replaced once solution opened once or built once or similar. there might other options out there, 1 tried worked that, files added later problematic.

for me easy use cmake can used generate files different compilers , platforms, support more visual studio accessible.

here small cmakelists.txt file use of codes:

cmake_minimum_required (version 2.6) project(project_name)  # include cpp , header files file(glob sources *.cpp *.h)  add_executable(project_name ${sources}) 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -