#cross-platform C/C++ project structure question

1 messages · Page 1 of 1 (latest)

idle geyser
#

i genuinely can't seem to find this anywhere, i'm a beginner ish developer and have a couple of projects on github, when i was on linux i used to just have a build folder for my projects and call "cmake . -B build/" then just build it in there

right now i'm on windows, using visual studio instead of neovim, generating solution files using cmake on there makes it so when i open the solution i cant see the whole directory tree (because i'm in the build folder instead), so i'm not sure how i'm supposed to program and build the project at the same time

is there any person who does windows development who knows if my structure is just wrong or i'm doing something wrong?

#

oh yeah forgot to show what the structure is actually like in the first place

icy ledge
#

there's no need to generate VS project files. VS has built-in cmake support. just right click on your project folder > open in visual studio

idle geyser
#

while if i open it using a solution file it actually picks up on it

#

is there not an industry standard?

icy ledge
idle geyser
icy ledge
#

you commit the portable part of the cmakesettings

#

I don't think there's a way to do this in cmake directly

harsh cobalt
#

Otherwise you will be confused about why two files named Something can exist at once

#

One .cpp, another .h
Maybe even a .inc too

idle geyser
#

i'm not that new to coding lol