Use g++ instead of gcc on .c files Sysprogs forums › Forums › VisualGDB › Use g++ instead of gcc on .c files Tagged: g++ gcc Project Properties This topic has 4 replies, 2 voices, and was last updated 7 years, 7 months ago by jmkresse. Log In Register Lost Password Viewing 5 posts - 1 through 5 (of 5 total) Author Posts April 17, 2017 at 20:46 #11006 jmkresseParticipant I would like VisualGDB to use g++ instead of gcc on .c files. How do I change to Project Properties to do that? (I know I can manually edit the Makefile, but I need to be able to do this on many projects, so I can’t do that.) April 17, 2017 at 21:29 #11007 jmkresseParticipant In other words, I want make to use $(CXX) instead of $(CC) on .c files, and I want to avoid having to hand edit the Makefile to do that. April 18, 2017 at 00:30 #11008 jmkresseParticipant I think I found an answer to my own question. If I’m incorrect, or if someone has a better or more elegant answer, please post. My answer is to do the following: In the VisualGDB Project Properties, under Makefile settings, under Build tools, in Additional arguments, I put: CC=$(CXX) April 18, 2017 at 07:20 #11011 supportKeymaster Hi, That should work. Another option would be to add “-x c++” to the CFLAGS to explicitly tell GCC to treat the file as a .cpp file. April 18, 2017 at 17:00 #11016 jmkresseParticipant Thanks! I think I like that option better. Author Posts Log In Register Lost Password Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In