Linking errors

  • Ticamai
    24th Jan 2011 Member 0 Permalink
    Followed the tutorial on wiki for using Code::Blocks, now i'm having linker errors.

    obj\Release\src\interface.o:interface.c: (.text+0x9255) undefined reference to '_ShellExecute'
    ..\MinGW\lib\libmingw32.a(main.o) :main.c: (.text+0xd2) undefined reference to '_WinMain@16'

    If I add in an #include <windows.h> to interface.c, it fixes the first error, but I'm still having trouble with the second, and i'm still not sure the first is fixed correctly. I feel like I may have skipped some major step somewhere, but i'm just not seeing it.

    EDIT:
    Okay, i fixed it, the problem was in the order that I included the linker libraries in.