### Author Topic: Having a look to asmc  (Read 3671 times)

#### Vortex

• Member
• Posts: 2106
##### Re: Having a look to asmc
« Reply #15 on: September 17, 2018, 04:27:06 AM »
Hi nidud,

I downloaded the latest asmc release. I get the following error messages using your batch file above :

Code: [Select]
`\asmc-master\bin\asmc64 -I\asmc-master\include test.asmAsmc Macro Assembler (x64) Version 2.28.08Copyright (C) The Asmc Contributors. All Rights Reserved. Assembling: test.asm\asmc-master\bin\linkw sys con_64 file testLINKW Version 2.0Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.Source code is available under the Sybase Open Watcom Public License.Warning! W1107: undefined system name: con_64loading object filessearching librariesWarning! W1008: cannot open directxmath.lib : No such file or directoryError! E2028: printf is an undefined referenceError! E2028: XMConvertVectorFloatToInt@@24 is an undefined referenceWarning! W1023: no starting address found, using 00401000creating a 64-bit PE executablefile test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24file test.obj(test.asm): undefined symbol printf`

#### nidud

• Member
• Posts: 1852
##### Re: Having a look to asmc
« Reply #16 on: September 17, 2018, 06:32:11 AM »
I downloaded and tested the batch file and it seems to work just fine. From the output the linkw.lnk file appear to be missing.

#### Vortex

• Member
• Posts: 2106
##### Re: Having a look to asmc
« Reply #17 on: September 17, 2018, 06:49:18 AM »
Hi nidud,

I have the file \asmc-master\bin\linkw.lnk but still I get the error messages.

The batch file :

Code: [Select]
`SET ASMCDIR=\asmc-master\asmc-master\bin\asmc64 -I\asmc-master\include test.asm\asmc-master\bin\linkw sys con_64 file test`

#### nidud

• Member
• Posts: 1852
##### Re: Having a look to asmc
« Reply #18 on: September 17, 2018, 07:14:01 AM »
I tried using CMD instead of DZ and ended up with the same result. It appears the linkw.lnk file needs to be in the %PATH% for LINKW to find it. The following batch worked:
Code: [Select]
`SET PATH=D:\asmc-master\binSET ASMCDIR=\asmc-masterasmc64 -I\asmc-master\include test.asmlinkw sys con_64 file test`

#### nidud

• Member
• Posts: 1852
##### Re: Having a look to asmc
« Reply #19 on: September 17, 2018, 09:25:30 AM »

#### Vortex

• Member
• Posts: 2106
##### Re: Having a look to asmc
« Reply #20 on: September 18, 2018, 03:23:29 AM »
Hi nidud,

Thanks for the update. Here is my report. I received the similar error messages both with the batch file and the makefile executed by DosZip :

Code: [Select]
`D:\asmc-master\test>pathPATH=C:\Program Files (x86)\Sent;C:\app\Administrator\product\11.2.0\client_1;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\D:\asmc-master\test>Build.batD:\asmc-master\test>SET PATH=\asmc-master\binD:\asmc-master\test>SET ASMCDIR=\asmc-masterD:\asmc-master\test>asmc64 -I\asmc-master\include test.asmAsmc Macro Assembler (x64) Version 2.28.08Copyright (C) The Asmc Contributors. All Rights Reserved. Assembling: test.asmD:\asmc-master\test>linkw sys con_64 file testWarning! W1008: cannot open directxmath.lib : No such file or directoryWarning! W1008: cannot open uuid.lib : No such file or directoryError! E2028: XMConvertVectorFloatToInt@@24 is an undefined referencefile test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24D:\asmc-master\test>pathPATH=\asmc-master\bin`
Checking the environment variable PATH, I see that it's modified to reflect only the path of asmc. I should be like the following
PATH = %PATH%;\asmc-master\bin

DosZip :

Code: [Select]
`Asmc Make Version 1.6 Copyright (c) 2017 GNU General Public Licensetest.exe:        asmc64 test.asm        linkw sys con_64 file test        test.exe        pauseAsmc Macro Assembler (x64) Version 2.28.08Copyright (C) The Asmc Contributors. All Rights Reserved. Assembling: test.asmWarning! W1008: cannot open directxmath.lib : No such file or directoryWarning! W1008: cannot open uuid.lib : No such file or directoryError! E2028: XMConvertVectorFloatToInt@@24 is an undefined referencefile test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24`
OS : Windows 7 Sp1 64-bit Professional with the latest updates
Path of asmc : D:\asmc-master
Location of the test project : D:\asmc-master\test

#### nidud

• Member
• Posts: 1852
##### Re: Having a look to asmc
« Reply #21 on: September 18, 2018, 04:17:12 AM »
Well, the import + libc libraries appear to exist (no missing printf) but directxmath.lib and uuid.lib is missing. Try building the missing libraries and remove the includelib stuff from the source. The include files take care of all that.

To build the missing libraries using DZ, go to ./source/directx and hit enter on the makefile. Same with uuid. This should probably be added to the install.bat file thought.

#### Vortex

• Member
• Posts: 2106
##### Re: Having a look to asmc
« Reply #22 on: September 18, 2018, 04:29:43 AM »
Hello nidud,

Thanks, building the missing libraries solved the problem.

This should probably be added to the install.bat file thought.

Exactly.

Here is my report :
Code: [Select]
`C:\asmc-master\test>pathPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\obw\Mingw32\bin;C:\Program Files\OpenVPN\bin;C:\asmc-master\test>Build.batC:\asmc-master\test>SET PATH=\asmc-master\binC:\asmc-master\test>SET ASMCDIR=\asmc-masterC:\asmc-master\test>asmc64 -I\asmc-master\include test.asmAsmc Macro Assembler (x64) Version 2.28.08Copyright (C) The Asmc Contributors. All Rights Reserved. Assembling: test.asmC:\asmc-master\test>linkw sys con_64 file testC:\asmc-master\test>pathPATH=\asmc-master\binC:\asmc-master\test>notepad'notepad' is not recognized as an internal or external command,operable program or batch file.`
There is only one problem, the environment variable %PATH% should preserve the original value followed by the path to asmc.

Code: [Select]
`PATH = %PATH%;\asmc-master\bin`
As you can see in my report, I cannot execute notepad or other tools since %PATH% points only the asmc installation.

nidud, thanks for the update. Keep up the nice work :t

#### nidud

• Member
• Posts: 1852
##### Re: Having a look to asmc
« Reply #23 on: September 18, 2018, 07:13:06 AM »

I added the two directories to install.bat.

The latest version of LINKW do not need the PATH statement in the batch file so only the root directory (ASMCDIR) needs to be set (or remove it by edit the linkw.lnk file).

However, the shell (DZ) holds the environment for the current source so it's recommended to use this instead of CMD. Note also that the environment is local (mistake I did when testing) to the source tree. If you copy one instance of DZ.EXE to \masm32\bin and execute it, use Ctrl-K, Ctrl-X, and Ctrl-O to emulate CMD, and issue the following commands:

D:\masm32\bin>PATH
PATH=D:\masm32\bin;C:\Windows;...

D:\masm32\bin>echo %INCLUDE%
D:\masm32\include

D:\masm32\bin>echo %ASMCDIR%
D:\masm32

So it adapts to the directory where it is located. The default setting is as follows (dz.ini):

[Environ]
0=INCLUDE=%ASMCDIR%\include

[Path]
0=%DZ%
1=%PATH%

#### Vortex

• Member
• Posts: 2106
##### Re: Having a look to asmc
« Reply #24 on: September 19, 2018, 06:22:33 AM »
Hi nidud,

Very nice work :t Thanks.