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.

Use MFC in ArchiCAD Addon

Anonymous
Not applicable
Because I want to send Data from ArchiCAD to an App via DDE, I need mfc support in the add on. Trying this I get a linker error:

Fehler 1 error LNK2005: _DllMain@12 ist bereits in ACAP_STAT.lib(ACAPlib.obj) definiert. mfcs80d.lib

English
Error 1 error LNK2005: _DllMain@12 is already defined in ACAP_STAT.lib(ACAPlib.obj). mfcs80d.lib

So has anyone a idea, or has already done similar things?

Thanks marc
1 REPLY 1
Ralph Wessel
Mentor
mrndf wrote:
Because I want to send Data from ArchiCAD to an App via DDE, I need mfc support in the add on. Trying this I get a linker error:
Fehler 1 error LNK2005: _DllMain@12 ist bereits in ACAP_STAT.lib(ACAPlib.obj) definiert. mfcs80d.lib
English
Error 1 error LNK2005: _DllMain@12 is already defined in ACAP_STAT.lib(ACAPlib.obj). mfcs80d.lib
So has anyone a idea, or has already done similar things?
I suggest finding another way to send the data. MFC comes with a whole bundle of assumptions that will cause problems in an add-on environment - link errors are only the beginning of the pain. Keep in mind that an add-on is not an application in its own right and is subject to a number of restrictions as a result.
Ralph Wessel BArch
Learn and get certified!