Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

16-bit DOS C library / QB LINK.EXE Problem

RonManRonMan Member Posts: 7
I'm making a medium-model, 16-bit graphics library with Open Watcom C for use with Microsoft QuickBASIC 4.5

here are my Watcom compiler/librarian switches:
-----------------------------------------------------------------
wmake -f D:Progwatcomproj2D2dlib.mk -h -e D:Progwatcomproj2D2dlib.lib
wcc WHATEVER.C -i=D:Progwatcomh -w4 -e25 -zq -zlf -od -fpi87 -bt=dos -mm
%create 2dlib.lb1
wlib -b -c -n -q -p=512 -irn 2dlib.lib @2dlib.lb1

Microsoft LINK command line:
------------------------------
link /DOSSEG /QU 2dlib.lib, 2dlib.qlb, NULL, libBQLB45.LIB

The library compiles. But when I try to LINK it into a .QLB (for QuickBASIC), I have to link in 3 extra C libs (clibm.lib, math87m.lib and noemu87.lib)

When I link clibm.lib, the linker spits out:
----------------------------------------------
d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __child : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __psp : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osmajor : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osminor : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osmode : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __ovlflag : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __intno : symbol defined more than once
d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __ovlvec : symbol defined more than once

...but continues on, letting me include both math87m.lib and noemu87.lib without errors.

Shortly afterwards the linker exits with:
------------------------------------------
d:progwatcomlib286dosclibm.LIB(cmain086) : error L2029 : 'main_' : unresolved external

There were 9 errors detected

I'm stuck, and have no clue what to do.
Thanks in advance,
RonMan

Comments

  • GaashiusGaashius Member Posts: 349
    : I'm making a medium-model, 16-bit graphics library with Open Watcom C for use with Microsoft QuickBASIC 4.5
    :
    : here are my Watcom compiler/librarian switches:
    : -----------------------------------------------------------------
    : wmake -f D:Progwatcomproj2D2dlib.mk -h -e D:Progwatcomproj2D2dlib.lib
    : wcc WHATEVER.C -i=D:Progwatcomh -w4 -e25 -zq -zlf -od -fpi87 -bt=dos -mm
    : %create 2dlib.lb1
    : wlib -b -c -n -q -p=512 -irn 2dlib.lib @2dlib.lb1
    :
    : Microsoft LINK command line:
    : ------------------------------
    : link /DOSSEG /QU 2dlib.lib, 2dlib.qlb, NULL, libBQLB45.LIB
    :
    : The library compiles. But when I try to LINK it into a .QLB (for QuickBASIC), I have to link in 3 extra C libs (clibm.lib, math87m.lib and noemu87.lib)
    :
    : When I link clibm.lib, the linker spits out:
    : ----------------------------------------------
    : d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __child : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __psp : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osmajor : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osminor : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(crwdata) : error L2025: __osmode : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __ovlflag : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __intno : symbol defined more than once
    : d:progwatcomlib286dosclibm.LIB(cstart) : error L2025: __ovlvec : symbol defined more than once
    :
    : ...but continues on, letting me include both math87m.lib and noemu87.lib without errors.
    :
    : Shortly afterwards the linker exits with:
    : ------------------------------------------
    : d:progwatcomlib286dosclibm.LIB(cmain086) : error L2029 : 'main_' : unresolved external
    :
    : There were 9 errors detected
    :
    : I'm stuck, and have no clue what to do.
    : Thanks in advance,
    : RonMan
    :
    :
    Well, if you have the source make it sure that no symbols are declared more than once, as the error tells it. Like:
    [code]
    int vaze;
    ...
    int vaze; /* this is bad
    [/code]

    ****************
    Any questions? Just ask!

    :-) [b][blue]GAASHIUS[/blue][/b] :-)


  • RonManRonMan Member Posts: 7
    [b][red]This message was edited by RonMan at 2005-6-30 12:43:45[/red][/b][hr]
    : Well, if you have the source make it sure that no symbols are declared more than once, as the error tells it. Like:
    : [code]
    : int vaze;
    : ...
    : int vaze; /* this is bad
    : [/code]
    :
    : ****************
    : Any questions? Just ask!
    :
    : :-) [b][blue]GAASHIUS[/blue][/b] :-)
    :
    :
    :

    The symbols that are defined more than once are in clibm.lib

    RonMan


  • GaashiusGaashius Member Posts: 349
    : [b][red]This message was edited by RonMan at 2005-6-30 12:43:45[/red][/b][hr]
    : : Well, if you have the source make it sure that no symbols are declared more than once, as the error tells it. Like:
    : : [code]
    : : int vaze;
    : : ...
    : : int vaze; /* this is bad
    : : [/code]
    : :
    : : ****************
    : : Any questions? Just ask!
    : :
    : : :-) [b][blue]GAASHIUS[/blue][/b] :-)
    : :
    : :
    : :
    :
    : The symbols that are defined more than once are in clibm.lib
    :
    : RonMan
    :
    :
    :
    Then, if you can edit that file somehow, delete all other defines exist after the first.

    ****************
    Any questions? Just ask!

    :-) [b][blue]GAASHIUS[/blue][/b] :-)


Sign In or Register to comment.