Questions tagged [object-files]

An object file is the real output from the compilation phase.

An object file is the real output from the compilation phase. It's mostly machine code, but has info that allows a linker to see what symbols are in it as well as symbols it requires in order to work. (For reference, "symbols" are basically names of global objects, functions, etc.)

A linker takes all these object files and combines them to form one executable (assuming that it can, ie: that there aren't any duplicate or undefined symbols). A lot of compilers will do this for you (read: they run the linker on their own) if you don't tell them to "just compile" using command-line options. (-c is a common "just compile; don't link" option.)

293 questions
0
votes
2 answers

Why is my data and bss segment memory usage zero?

I have this code which I compiled for MSP430 platform using msp430-gcc. #include #include // Preprocessor definitions #define ROR(x,r) ((x>>r) | (x << (64-r))) #define ROL(x,r) ((x << r) | (x >> (64-r))) #define R(x,y,k) (x =…
NanoNi
  • 315
  • 4
  • 16
0
votes
3 answers

Adding a common header/object file that is used by other object files

I have created a http library which contains 2 object files (web.o & webssl.o). These two files share some common constants and functions, that must be repeated for each file. Which also means that I need to update both files when changes are…
Deanie
  • 2,316
  • 2
  • 19
  • 35
0
votes
1 answer

Save and Read Key-Value pair in Spark

I have a JavaPairRDD in the following format: JavaPairRDD< String, Tuple2< String, List< String>>> myData; I want to save it as a Key-Value format (String, Tuple2< String, List< String>>). myData.saveAsXXXFile("output-path"); So my next job could…
Edamame
  • 23,718
  • 73
  • 186
  • 320
0
votes
1 answer

".OFF" descriptions

I'd like to make a scene that uses meshes and primitives (such as spheres, cylinders, boxes, etc). I was wondering if there are any recommendations with regard to where I can go to find .off files that describes complex meshes, such as mountains,…
Myx
  • 1,792
  • 5
  • 23
  • 37
0
votes
0 answers

Adding object file to cpp code in eclipse

I followed the ways mentioned in Link object file to my project Eclipse CDR My main function is in cpp code and from that I wish to call a c-function. So for that I created the object file (.o) from the c-code using gcc -c -fpic mycode.c This…
user3555809
  • 31
  • 1
  • 1
  • 5
0
votes
1 answer

How to compile a set of C files with a set of object files in C

So my question is that i have a set of C files (Lot of them), I have another set of c files which are already compiled and they are translated to type .o(object) and .d (dependency) My Questions: Now in my project I have to add the second set of…
0
votes
1 answer

No object file from cmake

I have a C++ program I'm trying to make with CMake. The cmake part seems to go well, I get the following messages when I run cmake .. in the build directory: -- Configuring done -- Generating done -- Build files have been written to:…
0
votes
3 answers

Why are many object files linked instead of one large object file?

Why is it that compiled programming languages (C++ for example) are set up to create many object files that are linked together as opposed one large object being created? For example (written in C++, could apply to any compiled language), consider…
Brendon Boldt
  • 235
  • 2
  • 11
0
votes
1 answer

cuda separate compilation "undefined methods"

I'm having problems using separate compilation with cuda c. I have 2 files. nsim.cu and methods.cu. in my methods.cu files, i have all my kernel functions "_ _global _ _" and my nsim.cu calls these functions. my problem is that when trying to call…
Chris Phillips
  • 1,997
  • 2
  • 19
  • 34
0
votes
0 answers

Template class to object file woes in c++ (GCC compiler)

Okay, I have a situation like this. foo.h #ifndef _FOO #define _FOO template class foo{ private: //stuff public: //more stuff }; #include "foo.cpp" #endif And of course, in foo.cpp, I have my…
0
votes
1 answer

Sys_error using ocamlmklib on an object file

I am compiling a theorem prover on cygwin and I get this error: $ make ocamlmklib -o bin/minisatinterface minisat/core/Solver.o minisat/simp/SimpSolver .o bin/Ointerface.o -lstdc++ ** Fatal error: Error while reading minisat/core/Solver.o:…
Gergely
  • 6,879
  • 6
  • 25
  • 35
0
votes
1 answer

Difference in Object Files formats

What is the difference between COFF (Common Object File Format) and ELF (Extendable and Linkable Format), other than they being for distinct platforms?? If I have C Compiler, the Object files that my Linker in the toolchain will receive is of COFF…
user2045557
0
votes
0 answers

How does visual studio 2010 treat .lib files that are not used

according to my another question , suppose that I have a .lib files and I don't know which .lib a specific function belongs to? Somewhere I studied if I link all of that .libs this will not effect the size of my final project? Because VC won't…
0
votes
2 answers

Building object files that depends on other object files

EDITS: Including link to my makefile I have a main program that calls a bunch of functions defined in other source files. This is not a problem because I am using cc -c functionSource.c functionHeader.h and generating object files before compiling…
0
votes
0 answers

Building object files which depend on other object files (C++)

I have a file, Matching.cxx, which contains some class method definitions and some other functions. It contains calls to many other classes. In my makefile I create object files for al of the other classes first and then attempt to make Matching.o.…
JMzance
  • 1,704
  • 4
  • 30
  • 49