11
endor
7y

Vs studio 17, Y U NO COMPILE MAH C++? It's literally one tiny program, with only one "Rectangle" class. g++ likes it and compiles it clean, why can't you be more like him? :(

Comments
  • 1
    Probably a path or compile flag issue?
  • 0
    @bkwilliams Yeah VS is quite annoying with that. I always had to mark my .h as pragma once so it wouldn't try to compile them multiple times and break
  • 0
    @Zezura it's telling me that all my methods are already defined in main.obj - I haven't checked the compile flags though, gonna give it a look

    @CristCD not even #pragma once helps
  • 1
    @endor clean solution and then build. If that doesn't work I think you can manually delete the compiled files and it won't complain
  • 0
    Already tried cleaning the solution, I guess I'll have to nuke those build files and redo from scratch :/
  • 1
    @endor Yeah, even creating a new project and copying over the files could work. VS is a great IDE, but really stupid sometimes
  • 0
    If g++ is working, why bother with vstudio?
    I'll fire up VS for .net work, but for good ol fashioned C or C++, I'm pretty happy using CodeLite.
  • 1
    @mhudson I'm using g++ on ubuntu, and I wanted to try something new on windows (I still had Dev-C++).
  • 0
    @endor yeah, dev-c++ is pretty old (I'm surprised it's still around!). There are other very decent code editors available on Windows. I hear good things about CLion (never used it though), and I've been fairly pleased by CodeLite.
    If VStudio is getting in the way of you gettin' shit done, and you can use g++, you have lots of options. :-)
  • 0
    @mhudson thanks for the tips! Am still experimenting, so I'll give them a try!
  • 2
    @Zezura nvm I'm an idiot, I had #include "Rectangle.cpp" instead of "Rectangle.h". Oops :D
Add Comment