#1223 creating shared dlls yields undefined reference to `WinMain@

OTHER
closed
nobody
gcc (462) gcj (6)
out-of-date
Unknown
2013-02-05
2008-12-16
d2walter
No

Whenever I add an object file that was generated with gcj to a g++ link command for a shared dll, I get an undefined reference to `WinMain@16'. I am not sure why this is required for a dll. I tried posting questions about this to the GCJ list first, and they gave me some suggestions about things to try to get more information for diagnosing this. The error below indicates that this main.o is linked in - this happens whenever java.lang.Object (or probably anthing else) is used from the libgcj.a library.

c:/documents and settings/dan/my documents/programs/cygwin/home/dan/ming/bin/../
lib/gcc/mingw32/4.3.0/../../../libmingw32.a(main.o):main.c:(.text+0xbd): undefin
ed reference to `WinMain@16'

Discussion

  • d2walter

    d2walter - 2008-12-16

    the summary got clipped, this is happening in the 4.3 version of gcj

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-05
    • labels: gcc --> gcc, gcj
    • status: open --> closed
    • resolution: --> out-of-date
    • category: --> Unknown
    • milestone: --> OTHER