tags:

views:

167

answers:

3

Don't ask why, but is there any way to suppress a failed linking error?

Such as:

undefined reference to BLANK

This is in GCC 3.4.6

+5  A: 

No, because they are errors and not warnings. By definition this means that the function was referenced someplace but not defined... that's not something you can just ignore.

SoapBox
A: 

The only way of supressing the link errors would be not linking (or not having errors in the first place). As mentioned by SoapBox, errors cannot be silently ignored.

If you post some code you could get to a solution to the problem that is better than trying to close your eyes and wait for the problem to go away (they don't usually).

David Rodríguez - dribeas
A: 

It's not the compiler, but the linker. The best way to "suppress" this would be to pass in the library name with the compile command:

gcc try.cc -lstdc++

or

g++ try.cc -lfltk

for instance.

Max Lybbert