hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

Linker error when trying to build Verb

Open aseverino opened this issue 4 years ago • 2 comments

I'm trying to build Verb, but I get linker errors that seem to be related to HXCPP.

Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "int hx::gMarkID" (?gMarkID@hx@@3HA) verbstest V:\verbstest\verbstest\main.obj 1 Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "int hx::gMarkIDWithContainer" (?gMarkIDWithContainer@hx@@3HA) verbstest V:\verbstest\verbstest\main.obj 1 (And others)

I have the compile results BuildTool.lib and Host.lib, and I don't know what else I might be missing.

aseverino avatar Mar 07 '20 20:03 aseverino

Are you using hxcpp generated code as a separate library, rather than an executable?

It looks like these variables are missing the HXCPP_EXTERN_CLASS_ATTRIBUTES modifier macro in include/hx/GC.h. You could try adding it, or if you have a list of unresolved variables, I coud add it an see if it fixes things.

hughsando avatar Mar 08 '20 01:03 hughsando

I'm generating lib files from he HXCPP and also including the .h files on my app path.

For the more detailed error, you could check this link on Verb github page:

https://github.com/pboyer/verb/issues/48

aseverino avatar Mar 08 '20 02:03 aseverino