[gnu.g++.bug] problems linking g++ 1.36.2 with gcc 1.36.91 object files

whitcomb@IC.BERKELEY.EDU (Gregg Whitcomb) (01/10/90)

machine: vax/ultrix
gcc: 1.36.91
g++: 1.36.2

description: symbols defined in a .c and compiled with gcc are not
recognized properly during linking.

ic% more testfile2.cc
#include <stream.h>
extern int return2();

main()
{
   cout << return2() << "\n";
}
ic% more testfile1.cc
testfile1.cc: No such file or directory
ic% more testfile2.cc
#include <stream.h>
extern int return2();

main()
{
   cout << return2() << "\n";
}
ic% more testfile1.c
int return2()
{
   return 2;
}
ic% g++ -c testfile2.cc
ic% gcc -c testfile1.c
ic% g++ -o t testfile2.o testfile1.o
testfile2.o: Undefined symbol return2() referenced from text segment



-Gregg (whitcomb@ic.Berkeley.EDU)