News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

JWASM build quirk.

Started by hutch--, January 14, 2012, 02:55:10 PM

Previous topic - Next topic

hutch--

I try as time allows to build the recent version of JWASM but version 206s would not build. I kept getting errors in the following file until I commented out the two lines. Tried building it with multiple versions of NMAKE to no avail, same error as building it with a batch file


    lines 1081/82 tokenize.c

    // /**/myassert( token_stringbuf < end_stringbuf );
    // /**/myassert( tokenarray < end_tokenarray );


Has anyone else had problems building JWASM ?
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

PauloH

#1
I once have success only with MSVC 2003 toolset.
I'll try it later and tell you.


Edit: I tried it with MSVC 2003 toolset and it works fine again. Also the PellesC build works fine too.

hutch--

Thanks Paulo,

I did the build in PellesC and it worked OK but had to add a warning level of 1 to get rid of the list of warnings. I still don't understand why I had to comment out the two lines to build it with VC2003. I have the VCTOOLKIT2003 installed and it has all of the libraries but I cannot get any version of NMAKE to work with it. Even tried the VC2010 version of NMAKE and no go.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

RotateRight

Hutch,

If these are the errors you getting,
I might only point to a direction.
Assuming you are wanting a release build.

tokenize.c(1082) : error C2065: 'end_stringbuf' : undeclared identifier
tokenize.c(1082) : warning C4047: '<' : 'char *' differs in levels of indirectio
n from 'int'
tokenize.c(1083) : error C2065: 'end_tokenarray' : undeclared identifier
tokenize.c(1083) : warning C4047: '<' : 'asm_tok *' differs in levels of indirec
tion from 'int'

Those lines have the macros myassert in them.
They are defined in myassert.h

#ifdef NDEBUG
#   define never_reach()    ((void)0)
#   define myassert(expr)   ((void)0)
#else
#   define never_reach()    InternalError(__FNAME__,__LINE__)
#   define myassert(expr)   ((void)((expr) ? 0 : InternalError(__FNAME__,__LINE__)))
#endif

NDEBUG is not defined for you.

Then in Msvc.mak, NDEBUG would only be added here.

!if $(DEBUG)
!if $(TRMEM)
extra_c_flags = -Zd -Od -DDEBUG_OUT -DTRMEM
!else
extra_c_flags = -Zd -Od -DDEBUG_OUT -FAa -Fa$*
!endif
!else
extra_c_flags = -O2 -Gs -DNDEBUG
#extra_c_flags = -Ox -DNDEBUG
!endif

Bound to have to do with "DEBUG".

hutch--

Thanks,

I got it to build with a batch file by chasing the build options from the MAK file.


@echo off

set bin=\vctoolkit\bin\
set include=\vctoolkit\include\
set lib=\vctoolkit\lib\

:: SPEED
:: %bin%cl.exe -c -IH -I%include%  -O2 -Gs -DNDEBUG @cl.rsp

:: SIZE
%bin%cl.exe -c -IH -I%include%  -O1 -Os -Gs -DNDEBUG @cl.rsp

:: SIZE with MSVCR100.DLL
:: %bin%cl.exe -c -IH -I%include%  -O1 -Os -MD -Gs -DNDEBUG @cl.rsp

%bin%link.exe /SUBSYSTEM:CONSOLE /Libpath:%lib% /OUT:jwasm.exe /OPT:NOWIN98 @lnk.rsp

dir jwasm.exe

pause
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php


hutch--

Dave,

Thanks for the link. This is what I used to build it in vc2010 but it turns out a lot bigger built in vc2010.


@echo off

set bin=\vc2010\bin\
set include=\vc2010\include\
set lib=\vc2010\lib\

:: SPEED
%bin%cl.exe -c -IH -I%include%  -O2 -Gs -DNDEBUG @cl.rsp

:: SIZE
:: %bin%cl.exe -c -IH -I%include%  -O1 -Os -Gs -DNDEBUG @cl.rsp

:: SIZE with MSVCR100.DLL
:: %bin%cl.exe -c -IH -I%include%  -O1 -Os -MD -Gs -DNDEBUG @cl.rsp

%bin%link.exe /SUBSYSTEM:CONSOLE /Libpath:%lib% /OUT:jwasm.exe @lnk.rsp

:: -----------------
:: clean up the mess
:: -----------------
   del *.obj

dir jwasm.exe

pause
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

KeepingRealBusy

Hutch,

Also check out my error reports on SourceForge for errors encountered with version 206e, including uninitialized variable used when compiled with debug, bad objects ,etc.

Dave.

hutch--

Dave,

I tend to rely on the release version when I run a binary file and having been used to MASM for the last 20 years or so, a few bugs here and there are of little consequence if you know what they are. I have tested the builds on normal MASM code and almost exclusively all build variations work fine.

I write my own code using MASM, versions 9 and 10 seem to do most things OK, the earlier versions still work fine if you don't need SSE2 and later so there is little for me to gain by doing much more.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php