Skip to content

Undefined reference link error after successful compile #30631

Closed
@jminer

Description

@jminer

The following code compiles without error but gives a link error:

https://github.com/jminer/clear-coat/tree/link-error

Further attempts to reduce it have made the error go away, but someone else can probably get it a lot shorter. To reproduce the error, run cargo run --example basic_controls in the link-error branch. In the full code, I have a couple other methods in CallbackRegistry that work fine, but if I try to use remove_callback, I get a link error. Here's the error:

note: C:\Files\Projects\clear-coat\target\debug\examples\basic_controls.0.o: In function `ZN14basic_controls16common_callbacks19CallbackRegistry<F>15remove_callbackE':
c:\Files\Projects\clear-coat/<std macros>:6: undefined reference to `common_callbacks::CallbackRegistry$LT$F$GT$::remove_callback::_FILE_LINE::hdeeab2d67af13153Cba'
c:\Files\Projects\clear-coat/<std macros>:3: undefined reference to `common_callbacks::CallbackRegistry$LT$F$GT$::remove_callback::_FILE_LINE::hdeeab2d67af13153Cba'

I'm using rustc 1.7.0-nightly (b4707eb 2015-12-27) 32-bit GNU on 64-bit Windows 7.

Issue #17610 is another link error, but I don't know if it is the same cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions