1

I am not yet at the point of linking, but as soon as my project compiles I will face this issue:

  • I have one c.o object file compiled by gcc from pure C code
  • I have one d.o object file compiled by g++ with extern"C" for C compatibility of functions that needs to be callable by the c.o
  • I have a lot of *.o object files compiled by g++ from pure C++ code that are called by the d.o part

How should I link the whole as a one block shared library? Using gcc or g++? This library will then be used by Apache2 as a C module.

Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169

1 Answers1

1

Using g++ you can link both types of .o files. Only gcc will fail.

Michael Mrozek
  • 169,610
  • 28
  • 168
  • 175
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152