News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Testing RichEditBib (Highlight Syntax Richedit)

Started by HSE, April 07, 2021, 04:04:54 AM

Previous topic - Next topic

jj2007

make.cmd:
@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:
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:

Biterider

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

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.
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

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 **********
***************************

HSE

Hi JJ

Quote from: jj2007 on June 02, 2021, 09:02:20 PM
Bitness:        64

Quote from: jj2007 on June 02, 2021, 09:02:20 PM
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 :SysSetup OOP, WIN32, ANSI_STRING
Equations in Assembly: SmplMath

jj2007

Hector, I am trying desperately to assembly your original code... and it's too messy for my taste, I'll give up now, sorry.

HSE

Quote from: jj2007 on June 02, 2021, 10:46:30 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 :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