3

I'm trying to generate the ".o" output of my ".cpp" files of my project in Microsoft Visual Studio C++ 2010.

I already found the answer that says that to compile without link you have to just press Ctrl+F7, however where is that object file created?

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
  • 1
    I believe that object files on some Microsoft systems are called `*.obj` not `*.o` as on Linux. But the last time I compiled on a Microsoft system was in the 1980-s .... – Basile Starynkevitch Jan 10 '12 at 11:40
  • 2
    Basile's memory is pretty good; Microsoft's compilers still create `*.obj` files. Look in the `Debug` or `Release` directories in your project folder. – Cody Gray - on strike Jan 10 '12 at 11:46
  • @Basile Starynkevitch More fundamentally, Windows' object files are COFF while Linux and friends are ELF. I don't think Microsoft's compilers can even output ELF. – Martin Green Jan 10 '12 at 11:57
  • Yes, and Microsoft linking model, is according to what I remember from reading Levine's book on loaders and linkers, a mistake. Linux linking model is IMHO simpler. – Basile Starynkevitch Jan 10 '12 at 12:04

1 Answers1

3

Visual Studio creates *.obj files, which are always created, if you link them or not. The default directories are "Debug" and/or "Release", but this depends on the project settings.

Simon
  • 1,616
  • 2
  • 17
  • 39