Page 1 of 1

Build error on C++Builder 10.1 Berlin

Posted: Tue Mar 28, 2017 10:12 am
by NobMiwa
Hello,

I'm new in madCodeHook. I tried to build simple InjectLibrary/UninjectLibrary console application with C++Builder.

C++Builder 10.1 Berlin
madCodeHook 3.1.14

I add include file
"C:\Program Files (x86)\madCollection\madCodeHook\BDS18\win32\madCodeHook.h"
and link with
"C:\Program Files (x86)\madCollection\madCodeHook\BDS18\win32\madCodeHook_.lib"

And I got link error of "cannot open 'WINAPI.WINDOWS.OBJ' ".

Do I include and link correctly ?

Regards,
Nobuo Miwa

Re: Build error on C++Builder 10.1 Berlin

Posted: Tue Mar 28, 2017 1:43 pm
by madshi
I've just tried the following:

1) Started BCB 10.1 Berlin.
2) Created a new project.
3) In a button click event I added a call to "GetCallingModule()" (which is a function exported by madCodeHook).
4) I added "#include "madCodeHook.h"" directly under the "#include "Unit1.h"" line.
5) I saved and compiled the project.

Worked fine for me.

No need to manually add any lib files. Probably the problem you've seen came from trying to add that lib file.

Re: Build error on C++Builder 10.1 Berlin

Posted: Tue Mar 28, 2017 5:28 pm
by NobMiwa
Hello madshi,

Thank you for the information.
It worked.

Thanks

Re: Build error on C++Builder 10.1 Berlin

Posted: Wed Aug 30, 2017 2:25 am
by NobMiwa
When I tried to add new project of Form, it worked.
But when I tried to add new project of DLL, it didn't work.

1. I added new project of "Dynamic Link Library"
2. I added a line "#include "MadCodeHook.h"" above _libmain
3. I got "WINAPI.WINDOWS.OBJ" not found with ilink32 ERROR

Any suggestion ?

Re: Build error on C++Builder 10.1 Berlin

Posted: Wed Aug 30, 2017 8:13 am
by madshi
I'm not sure, I'm not that big of an BCB expert. I suppose you may want to double check the library paths?