Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List undefined references from object file

Tags:

c++

c

gcc

g++

So I'm building a bunch of modules with g++. I hit some of the source files with -c to produce the .o object files. I then at some points combine object files using the -r flag for ld to produce even more .o files. Somewhere in the process, a function is not getting included. So what I'm trying to do is find a quick tool that looks at a .o file and tells what references are currently undefined.

like image 281
sshannin Avatar asked Dec 04 '22 15:12

sshannin


1 Answers

On Linux you'd use objdump -t for that. Look for *UND* in its output.

like image 172
MvG Avatar answered Dec 09 '22 15:12

MvG