News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

LNK1318: Erreur PDB inattendue ; OK (0) ''

Started by TouEnMasm, August 14, 2015, 10:50:37 PM

Previous topic - Next topic

TouEnMasm

Hello,
i try to compile a 64 bits  asm file (with jwasm) in debug mode and get this error from link
Quote
LNK1318: Erreur PDB inattendue ; OK (0) ''
Any idea ?

Fa is a musical note to play with CL

TouEnMasm


The good idea is to compile it with visual studio and see what he do
answer is
Quote
/DEBUG:FASTLINK

Quote
   @echo off
   CLS
   call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
   :SET LIB=%LIB%;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64
   SET LIB=%LIB%;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64
        set INCLUDE=H:\sdkrc81\um;H:\sdkrc81\shared;H:\sdkrc81\VC
   SET FILE=Win64_8
   SET LINK
   pause
   : -------------------------------
   : if resources exist, build them
   : -------------------------------
   
   
   : -----------------------------------------
   : assemble Appender.asm into an OBJ file
   : -----------------------------------------
   :jwasm -c -Zi -Zd -coff %FILE%.asm
   jwasm.exe /c -Zi -coff -win64 -Zp8 /nologo /Zi  /W2 /coff  %FILE%.asm /Fo"x64\Release\%FILE%.obj"

   if errorlevel 1 goto errasm
   :Ml.exe /c /coff Create_Image_Objet.asm
   :if errorlevel 1 goto errasm
   pause
   if not exist %FILE%.rc goto nores
   Rc.exe /v %FILE%.rc
   Cvtres.exe /MACHINE:X64 /out:%FILE%.bin %FILE%.res
   
   if not exist %FILE%.bin goto nores
   ECHO ----------------------------           
   ECHO ******* avec RESSOURCE ******
   ECHO -----------------------------                 
   : --------------------------------------------------
   : link the main OBJ file with the resource OBJ file
   : --------------------------------------------------
   :Link  /SUBSYSTEM:WINDOWS /DEBUG:FASTLINK /debugtype:cv /OUT:%FILE%.exe *.obj %FILE%.res kernel32.lib user32.lib gdi32.lib

   Link  /SUBSYSTEM:WINDOWS /DEBUG:FASTLINK /debugtype:cv  /NXCOMPAT /OUT:%FILE%.exe *.obj %FILE%.bin
   if errorlevel 1 goto errlink
   GOTO FINLINK
   
   :nores
   ECHO ---------------------------                   
   ECHO ***** SANS ressource ******
   ECHO ------------------------------                   
   Link.exe /SUBSYSTEM:WINDOWS /DEBUG /debugtype:cv /OUT:%FILE%.exe *.obj kernel32.lib user32.lib gdi32.lib
   
   :FINLINK
   
   dir %FILE%.*
   
   goto TheEnd
   
   :errlink
   : ----------------------------------------------------
   : display message if there is an error during linking
   : ----------------------------------------------------
   echo.
   echo There has been an error while linking this project.
   echo.
   goto TheEnd
   
   :errasm
   : -----------------------------------------------------
   : display message if there is an error during assembly
   : -----------------------------------------------------
   echo.
   echo There has been an error while assembling this project.
   echo.
   goto TheEnd
   
   :TheEnd
   pause
Fa is a musical note to play with CL

rrr314159

This problem has been mentioned b4 but I can't find the relevant threads. There was a thread for x64_dbg, started by fearless (as I remember), where it was discussed, never resolved. I get a similar error, about "can't find PDB file" with 64-bit, no matter what options I use for JWasm and linker, and with any debugger. If you figure it out let me know! Meanwhile debugging without symbols is only a minor inconvenience
I am NaN ;)

fearless

Maybe this will help, a rough example of manually compiling from the command line, adjust for relevant paths etc

\JWasm\Bin\RC.EXE /V Test64.rc
\JWasm\Bin\JWASM64.EXE /c -win64 -Zp8 /Zi /win64 /D_WIN64 /Cp /nologo /W2 /I"M:\JWasm\Include" "Test64.asm"
\JWasm\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /MACHINE:X64 /DEBUG /DEBUGTYPE:CV /PDB:"Test64.pdb" /LIBPATH:"M:\JWasm\Lib\x64" /OUT:"Test64.exe" "Test64.obj" "Test64.res"

The soap box forum has a couple posts related to the x64 and creating pdb for symbols and a post in the 64bit forum about jwasm 64bit with radasm, and one in the goasm forum relating to getting pdb and debugging working for that stuff:

http://masm32.com/board/index.php?topic=4136.0
http://masm32.com/board/index.php?topic=4143.0
http://masm32.com/board/index.php?topic=4162.0

Hopefully one of those will help if the above command line options dont.