Linker error w HelloWorld project. What gives?



  • Hi all,

    So, first time with Mono & the toolchain (Mac OS X), and although everything seems to have installed OK, etc., when I try to link my hello world (unmodified), I get:

    $ make
    Linking hallowelt.elf
    build/mono_default_main.o: In function `AppController::~AppController()':
    /Users/me/Projects/hallowelt/./app_controller.h:17: undefined reference to `vtable for AppController'
    build/mono_default_main.o: In function `main':
    /usr/local/openmono/mono_default_main.cpp:19: undefined reference to `AppController::AppController()'
    collect2: error: ld returned 1 exit status
    make: *** [hallowelt.elf] Error 1
    

    I"m lost; shouldn't the default code magically compile without effort? Thoughts?


  • administrators

    It seems you can fix the problem by inserting the line

    OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
    

    into the generated Makefile before the line

    include $(MONO_PATH)/mono.mk
    

    There also seems to be some problems with the v1.1 of the framework installer and monoprog.

    Sorry about that, we will fix it as fast as possible.



  • Hurrah! That did it. Need anything else from me to help fix this internally?



  • Hi @pktm , it is my bad - I didn't see the this issue when I tested the new release for MacOS. I have fixed this now, at you should reinstall the SDK.

    Need anything else from me to help fix this internally?

    If you ask if you can help our development, then yes of course. We would love any help we can get. Else, if you mean if you should do more to resolve the issue - then you just need to reinstall.

    Happy hacking.


Log in to reply