Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

LNK4204 error - can’t debug

Tomer1
Newcomer
Hello,

On Mac I was able to debug flawlessly
On windows I’m getting lnk4204- says that API_c.pdb is missing and that it’s linking as if no debug info.
Even if I’m changing project settings to create API_c.pdb instead of myprojectname.pdb, it still can’t find it.

Thanks in advance!
19 REPLIES 19

Ralph Wessel
Advocate
Do you mean this message?
ACAP_STATD.lib(ACAPlib.obj) : warning LNK4099: PDB 'API_c.pdb' was not found with 'ACAP_STATD.lib(ACAPlib.obj)' or at 'C:\Program Files\Graphisoft\ArchiCAD 24\Add-Ons\CI Tools\API_c.pdb'; linking object as if no debug info
If so, you can ignore it - it's only debug info for content linked from the dev-kit (which you won't debug into anyway).
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
Do you mean this message?
ACAP_STATD.lib(ACAPlib.obj) : warning LNK4099: PDB 'API_c.pdb' was not found with 'ACAP_STATD.lib(ACAPlib.obj)' or at 'C:\Program Files\Graphisoft\ArchiCAD 24\Add-Ons\CI Tools\API_c.pdb'; linking object as if no debug info
If so, you can ignore it - it's only debug info for content linked from the dev-kit (which you won't debug into anyway).
But when I try to attach the process and hit breakpoints it says that “no symbols have been loaded”

Ralph Wessel
Advocate
Is the ARCHICAD Add-Ons folder the output directory for your build?
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
Is the ARCHICAD Add-Ons folder the output directory for your build?
No. I am copying the apx to the addons folder

Ralph Wessel
Advocate
Try building directly to the Add-Ons folder so the pdb files etc are in the same location as the runtime location of the add-on.
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
Try building directly to the Add-Ons folder so the pdb files etc are in the same location as the runtime location of the add-on.
Tried.
Both directly to the addons folder and directly to a sub folder in addons folder. Both didn’t work..

Getting the same “no symbols have been loaded” when trying to load a breakpoint

Maybe it’s important to say - I’m working offline.

Ralph Wessel
Advocate
Offline work should make no difference.

Do you see associated debug files, e.g. ".pdb", appearing in the directory with your add-on? Are the debug options active in your build configuration?
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
Offline work should make no difference.

Do you see associated debug files, e.g. ".pdb", appearing in the directory with your add-on? Are the debug options active in your build configuration?
Yes I see the pdb.
Debug options are active as far as I’m concerned. If you can tell me the specific ones to check I will.

Ralph Wessel
Advocate
Are you using Start Debugging from VS to begin the debugging process?
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
Are you using Start Debugging from VS to begin the debugging process?
I am just using Ctrl alt p and attaching to ac process.
That’s what I did Back with AC21 and worked..

Tomer1
Newcomer
I am using VS2019 with 2019 toolset. When changing to 2017 tool set (v141), I am getting a LOT of errors for most of the includes in the solution.. it somehow breaks the solution.
On which platform toolset should I work and how if the answer is 2017? (Of course I prefer newest toolset)

Ralph Wessel
Advocate
You should use the 2017 toolset. What kind of errors are you seeing?
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
You should use the 2017 toolset. What kind of errors are you seeing?
Ok, seems like no errors but no debug too. I am using Windows SDK v10.0.17763.0
Is it ok?

Ralph Wessel
Advocate
The example projects use the Windows 8.1 SDK, so we're doing the same. I haven't seen any documentation with a specific recommendation for that.
Ralph Wessel BArch

Tomer1
Newcomer
Ralph wrote:
The example projects use the Windows 8.1 SDK, so we're doing the same. I haven't seen any documentation with a specific recommendation for that.
So I installed 8.1 SDK and now using it. Still can’t debug. Still error lnk4099 about the API_c.pdb not found..

Ralph Wessel
Advocate
Tomer1 wrote:
I installed 8.1 SDK and now using it. Still can’t debug. Still error lnk4099 about the API_c.pdb not found..
The warning about API_c.pdb not found is irrelevant - we see that all the time, and I suspect it's unavoidable. It's not an error and won't prevent debugging.

I can't think of many reasons for debugging not working. Do you see the console output in VS from ARCHICAD as it launches? If so, check the log to see if there are any anomalies reported when your add-on is loaded. Also check that you don't have a duplicate release build loaded (which would block the debug version from loading).
Ralph Wessel BArch

Mihalcea Bogdan
Newcomer
I am getting the same errors.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\ACLibraryManagement.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSXML.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSRoot.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSXMLUtils.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\InputOutput.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\TextEngine.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\Geometry.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSUtils.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\VectorImage.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\LibraryLocalization.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\LibraryManager.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\ObjectDatabase.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\BuiltInLibrary.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\TWClientBase.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\TWRoot.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\Teamwork.Server.ProjectManager.Common.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\VBUtils.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\AttributeManager.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\VBAttributes.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\ElementManager.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\VBElements.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\VBElemOperations.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\DG.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GDL.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\Model3D.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSModeler.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSModeler2D.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\LibPartFile.dll'. Cannot find or open the PDB file.
'ARCHICAD.exe' (Win32): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\Pattern.dll'. Cannot find or open the PDB file.
I really don't know what to do so i can make it work.

Viktor Kovacs
Graphisoft
Graphisoft
Have you tried setting Archicad.exe as debug command and just hit debug in Visual Studio? You can right click on the project, select Properties, and replace Debugging/Command to your Archicad.exe, and just click Debug.

Please note that while your Add-On is not loaded into memory the breakpoint will appear as disabled and comes alive only when your Add-On is executing a command.

Mihalcea Bogdan
Newcomer
Well after I set that debugger to the Archicad.exe the debugger works. Still I get a lot of messages in the output but I disabled the module Load and Unload messages.

Thank you very much, Viktor Kovacs.

PS: Is it okay that I deleted the ALLBuild project from the projects?

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!