Menu

#21 unresolved external symbol _HB_FUN_HWG_KEYTOUTF8

v1.0_(example)
closed
nobody
None
1
2020-11-16
2020-04-01
No

I compiled the latest source code using hbmk2 under Windows with msvc. When trying to link I get:

procmisc.lib(hcedit.obj) : error LNK2001: unresolved external symbol _HB_FUN_HWG_KEYTOUTF8

This appears to be code aimed at Unix. I will try and recompile using the batch files and update this ticket if it helps.

Alex

Discussion

  • Alexander S.Kresin

    Should be fixed now.
    Regards, Alexander.

     
  • Alex Strickland

    Alex Strickland - 2020-04-02

    It is, thank you.

     
  • Wilfried Brunken

    Hello,
    same as Bug Ticket #35 created by Itamar M. Lins Jr. Junior .
    I'll test it as soon as possible ( MingW, Windows 10)

    TNX and
    With Regards
    Wilfried, DF7BE

     
  • Alex Strickland

    Alex Strickland - 2020-04-04

    This was not fixed, I am unable to say why I thought it was. However if I change: PLATFORM__Windows -> PLATFORM__WINDOWS
    then it is fixed. Perhaps the mixed case version is defined for XHarbour? I see the mixed case version is also used in dbgconnect.prg but I am not using that. Sorry for the confusing response.

    Regards, Alex

     
  • Wilfried Brunken

    Hello,
    i tested the above modification with MinGW and the sample dbview.prg works.
    I look into the makefile.gcc, line 19:
    HARBOURFLAGS = -d__WINDOWS__ ...
    this entry explains, that the old definition has no problems.
    The above declaration seems to be Harbour internal.
    I suggest, that Alexander Kresin check it with the other compilers,
    (Borland C, Pelles C, ..) before committing the modification into hcedit.prg.

    TNX and with regards
    Wilfried, DF7BE

     
  • Alex Strickland

    Alex Strickland - 2020-04-06

    I see __WINDOWS__ as you say in makefile.gcc, and in makefile.vc. However __PLATFORM__Windows or __PLATFORM__WINDOWS seems to be something defined in Harbour 3.4 (I don't know about 3.2 but I would guess so).

    The PLATFORM__W* usages are only found in 4 places in the whole r2820 source tree. There are far more __PLATFORM__UNIX and __PLATFORM__Linux__ (note trailing __).

    As I say it is compiling ok for me with __PLATFORM__WINDOWS (upper case), and for both hbmk2.exe and make_vc.bat.

    Regards
    Alex

     
  • Wilfried Brunken

    Hello Alex,
    i found no #if(n)def LINUX and have 3 matches "UNIX" in the
    recent source tree. I checked them and they are OK.
    The file hcedit.prg with #ifndef __PLATFORM__WINDOWS
    is now committed.

    73 es 55 de
    DF7BE, Wilfried

     
  • Alex Strickland

    Alex Strickland - 2020-04-06

    Hi Wilfried
    I found lots, please see the attached file.
    Regards
    Alex

     
  • Wilfried Brunken

    Hello Alex,
    TNX FER ur code reasearch.
    Now all committed and tested.
    Here my detailed report:

    Not modified files:
    Changelog: only comment
    include\prncharsets.ch: only comment
    hwgui\include\guilib.ch: Has no effect on Windows, only for GTK !
    source\common\editor\hcedit.prg: Already done ! (PSE use last code snapshot of HWGUI)

    Files modified:

    ifdef __PLATFORM__UNIX ==> #ifndef __PLATFORM__WINDOWS

    include\hwgextern.ch
    samples\winprn.prg
    samples\gtk_samples\winprn.prg
    source\common\debug\dbgconnect.prg
    source\common\procmisc\procs7.prg
    source\common\procmisc\procscri.prg
    utils\debugger\hwgdebug.prg
    utils\editor\editor.prg: New function GetVal_nTop() centralizes nTop setting 10 or 40 OS dependant.
    utils\editor\hcediext.prg
    utils\tutorial\hwgrun.prg
    utils\tutorial\tutor_eng.xml
    utils\tutorial\tutor.prg

    ifdef PLATFORM__UNIX ==> #ifdef __GTK

    utils\editor\editor.prg, line 18

    Please check the modifications and give feedback.

    With regards,
    MNI TNX es 73, 55 de
    Wilfried, DF7BE

     
  • Alex Strickland

    Alex Strickland - 2020-05-03

    Hi Wilfried
    This all looks fine with r2833, thank you. Please close.
    Regards
    Alex

     
  • Wilfried Brunken

    Hi Alex,
    could you do me a favour ?
    I checked in the modified makefile for VC. Can you test the compile task and send me a result.
    Then we must please Alexander Kresin to close the ticket.
    I have not the permission to do that.

    MNI TNX, 73 es 55, and with regards
    Wilfried, DF7BE

     
  • Alex Strickland

    Alex Strickland - 2020-05-06

    Hi Wilfried

    I ran my batch file to run the VC build (attached), and it seems the make file is not correct:

    d:\dev\hwgui-code>bld_hwgui_vcmake.bat
    
    d:\dev\hwgui-code>call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
    Setting environment for using Microsoft Visual Studio 2008 x86 tools.
    
    Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    NMAKE : fatal error U1073: don't know how to make 'obj/vc\hmisc.o'
    Stop.
    

    It looks to me like all that is needed on line 39 of makefile.c is change hmisc.o to hmisc.obj.

    Regards
    Alex

     
  • Alex Strickland

    Alex Strickland - 2020-05-06

    Hi

    Actually it needs a few more changes than that. I have attached makefile.vc file after a succesful build. I can't actually link with the lib created. There is a link error with the library which I don't get with the hbmk2 build. I tried to discover what the difference could be but I couldn't see it and gave up.

    Regards
    Alex

     
  • Luiz Rafael Culik

    • status: open --> closed
     

Log in to post a comment.