BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

LNK4204 error - can’t debug

Anonymous
Not applicable
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
Anonymous
Not applicable
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..
Anonymous
Not applicable
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
Mentor
You should use the 2017 toolset. What kind of errors are you seeing?
Ralph Wessel BArch
Anonymous
Not applicable
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
Mentor
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
Anonymous
Not applicable
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
Mentor
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
Contributor
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
Contributor
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?
Learn and get certified!