Author Topic: Testing RichEditBib (Highlight Syntax Richedit)  (Read 7877 times)

jj2007

  • Member
  • *****
  • Posts: 13275
  • Assembly is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #30 on: June 02, 2021, 07:36:26 PM »
make.cmd:
Code: [Select]
@echo off
REM Usage:
REM   1. copy this file to the destination folder.
REM   2. execute it to to start the build process.
set OBJASM_PATH=C:\ObjAsm\
call %OBJASM_PATH%\Build\OA_BUILD.cmd%*

output:
Code: [Select]
Building Tmp_File project ...

User Interface: WINDOW
Binary Format:  EXE
Bitness:        64
OOP support:    ENABLED
String Type:    ANSI
Mode:           RELEASE

Assembling Tmp_File.asm project ...
Linking object modules to EXE-file ...
""\link.exe"" is not recognised as an internal or external command,
 an executable or a batch file.

***************************
********** ERROR **********
***************************

There is definitely a C:\Masm32\bin\link.exe :cool:
Masm32 Tips, Tricks and Traps

Some members can't live without insulting others. It tells us a lot about them.

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1043
  • ObjAsm Developer
    • ObjAsm
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #31 on: June 02, 2021, 08:31:41 PM »
Hi JJ
I think the problem is the path configuration. The webistaller should have done it for you. If not, you need to do 2 things:
  • Set the environment variable OBJASM_PATH to the OA installation path.
  • Check the file ...\ObjAsm\Build\OA_SET.cmd. All tool chain files are defined here in only one place. No need to adjust paths elsewhere, unless you want to.

Note: This has made testing easier when a new assembler or linker version was released and I wanted to check all projects at once.

Biterider

jj2007

  • Member
  • *****
  • Posts: 13275
  • Assembly is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #32 on: June 02, 2021, 09:02:20 PM »
Hi Biterider,
I made modifications to OA_Set.cmd, see below, and that eliminated the linker error, but it still says "error" without specifying what kind of error.
Code: [Select]
REM Usual paths are:
REM OBJASM_PATH="D:\ObjAsm"
REM MSVS_PATH="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64"
REM WINKIT_PATH="%programfiles(x86)%\Windows Kits\10\bin\10.0.18362.0"

REM They are stored in the registry:
REM   - HKEY_CURRENT_USER\Environment
REM   - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set SYSTEM_BITNESS=32 || set SYSTEM_BITNESS=64

if %OS%==64BIT echo This is a 64bit operating system

set BldInf="%OBJASM_PATH%\Build\Tools\BuildInfo.cmd"
set Inc2RC="%OBJASM_PATH%\Build\Tools\Inc2RC.cmd"
set MidlCompiler="%WINKIT_PATH%\x64\midl.exe"
set UICCompiler="%WINKIT_PATH%\x86\UICC.exe"
set ResourceCompiler="%WINKIT_PATH%\x64\RC.EXE"

if %SYSTEM_BITNESS%==32 (
  set Assembler="%OBJASM_PATH%\Build\Tools\UASM32.EXE"
) else (
  set Assembler="%OBJASM_PATH%\Build\Tools\UASM64.EXE"
)
REM set Linker="%MSVS_PATH%\link.exe"
set Linker="\Masm32\bin\link.exe"
REM set LibraryCompiler="%MSVS_PATH%\lib.exe"
set LibraryCompiler="\Masm32\bin\lib.exe"
set Debugger="%programfiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe"

exit /b 0
Code: [Select]
Building Tmp_File project ...

User Interface: WINDOW
Binary Format:  EXE
Bitness:        64
OOP support:    ENABLED
String Type:    ANSI
Mode:           RELEASE

Assembling Tmp_File.asm project ...
Linking object modules to EXE-file ...

***************************
********** ERROR **********
***************************
Masm32 Tips, Tricks and Traps

Some members can't live without insulting others. It tells us a lot about them.

HSE

  • Member
  • *****
  • Posts: 2253
  • AMD 7-32 / i3 10-64
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #33 on: June 02, 2021, 10:43:37 PM »
Hi JJ

Bitness:        64

set Linker="\Masm32\bin\link.exe"
set LibraryCompiler="\Masm32\bin\lib.exe"

I think you are trying to build a 64 bits with 32 bit tools.

Try at begin of *.asm file modify to :
Code: [Select]
SysSetup OOP, WIN32, ANSI_STRING
Equations in Assembly: SmplMath

jj2007

  • Member
  • *****
  • Posts: 13275
  • Assembly is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #34 on: June 02, 2021, 10:46:30 PM »
Hector, I am trying desperately to assembly your original code... and it's too messy for my taste, I'll give up now, sorry.
Masm32 Tips, Tricks and Traps

Some members can't live without insulting others. It tells us a lot about them.

HSE

  • Member
  • *****
  • Posts: 2253
  • AMD 7-32 / i3 10-64
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #35 on: June 02, 2021, 11:09:05 PM »
and it's too messy for my taste

 :thumbsup: If I remember well, WinKit and VS not always have same structure. Can take a little effort but is only once time.

For example I have a little different setting in 32bit machine :
Code: [Select]
set Linker="%MSVS_PATH%\bin\hostx86\x86\link.exe"
set LibraryCompiler="%MSVS_PATH%\\bin\Hostx86\x86\lib.exe"

At first I also give up and set ObjAsm to use only masm32 package  :biggrin:
Equations in Assembly: SmplMath