#Problem with building/compiling with vscode

12 messages · Page 1 of 1 (latest)

worthy oyster
#

for using Visual studio code

This is using C++, can i only build/compile with one cpp file in the folder? For some reason when i had two cpp files, it would not build the cpp file "sqaure.cpp" into an exe, when i also had "test.cpp"
Both files had main functions so they are separate programs....

normal prairieBOT
#

@worthy oyster

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

worthy oyster
median topaz
#

You have to tell VSC that you want 2 different programs and which cpp files to compile into what.

#

If you don't say anything it defaults to compiling all cpp files into an executable which is the most common use-case, but you don't have that.

#

Your options are writing a launch.json or a CMakeLists.txt or makefile. I may have forgotten one.

worthy oyster
#

gotchya

#

ty so much

#

!solved

normal prairieBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

worthy oyster
#

!solved