Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualwqking

Posted 31 March 2012 - 08:13 AM

Really? I just double checked to see if MSVC 2010 was smart enough to do this and it wasn't. It generates a "LNK4042: object specified more than once; extras ignored" unless you manually number the object files or stick them in subdirectories yourself.

I also remember VC will put all .obj files to one directory, so the source files with same names will override each other's .obj file, no matter which directory the source files are in.
Anyway, I always use unique source file name to avoid trouble.

Here also has some discussion on that issue,
http://stackoverflow...lename-conflict
And here,
http://connect.microsoft.com/VisualStudio/feedback/details/361228/visual-c-compilers-only-one-file-of-two-with-the-same-name

#1wqking

Posted 31 March 2012 - 08:12 AM

Really? I just double checked to see if MSVC 2010 was smart enough to do this and it wasn't. It generates a "LNK4042: object specified more than once; extras ignored" unless you manually number the object files or stick them in subdirectories yourself.

I also remember VC will put all .obj files to one directory, so the source files with same names will override each other's .obj file, no matter which directory the source files are in.
However, I maybe wrong because now I only use CMake to generate VC project file which maybe different with native project file.
Anyway, I always use unique source file name to avoid trouble.

Here also has some discussion on that issue,
http://stackoverflow.com/questions/1968685/visual-c-2008-express-cpp-filename-conflict

PARTNERS