C++Builder 10.1 Berlin cannot link to madzip.obj [solved]

delphi package - automated exception handling

C++Builder 10.1 Berlin cannot link to madzip.obj [solved]

Postby Geocentrix » Wed Apr 12, 2017 12:18 pm

Hi

I'm a new user of madExcept. I am trying to integrate it into a C++ application built with C++Builder 10.1 Berlin, using the CLANG compiler.

I have installed madExcept and enabled it under Project > madExcept Settings.

However, when I build the application, I get the following linker error:

[ilink32-10.1 Error] Fatal: Unable to open file 'MADZIP.OBJ'


I cannot find madzip.obj anywhere.

What am I doing wrong?

Note that I don't get this error when I build using the BCC compiler.

Any help would be much appreciated.

Thanks!

Andrew Bond
Last edited by Geocentrix on Wed Apr 12, 2017 2:09 pm, edited 1 time in total.
Geocentrix
 
Posts: 5
Joined: Wed Apr 12, 2017 11:47 am

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby Geocentrix » Wed Apr 12, 2017 12:21 pm

I may have just found the answer to my question:

madExcept currently only supports BCB 32bit


Dammit. I thought it supported only 32 bit (i.e. BCB and CLANG).

Can anyone confirm this is right?
Geocentrix
 
Posts: 5
Joined: Wed Apr 12, 2017 11:47 am

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby madshi » Wed Apr 12, 2017 12:55 pm

I'm not sure I understand. You say you thought it supported only 32 bit. That's correct, and matches what you're quoting?
madshi
Site Admin
 
Posts: 9442
Joined: Sun Mar 21, 2004 5:25 pm

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby Geocentrix » Wed Apr 12, 2017 1:07 pm

Sorry, I was not very clear.

I understand that madExcept supports 32-bit Windows, using the BCC compiler only.

It does not support applications built with the CLANG compiler (32-bit or 64-bit).

Is that correct?
Geocentrix
 
Posts: 5
Joined: Wed Apr 12, 2017 11:47 am

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby madshi » Wed Apr 12, 2017 1:13 pm

madExcept supports both 32bit and 64bit OSs, and both the 32bit and 64bit Delphi compiler. However, madExcept currently only supports the 32bit BCB compiler, not the 64bit BCB compiler. I don't think it matters which compiler you're using (CLANG or not). But 64bit BCB is currently not supported.
madshi
Site Admin
 
Posts: 9442
Joined: Sun Mar 21, 2004 5:25 pm

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby Geocentrix » Wed Apr 12, 2017 1:17 pm

madshi wrote:madExcept currently only supports the 32bit BCB compiler ... I don't think it matters which compiler you're using (CLANG or not)


Thanks for the response.

OK, so my original question is back on the table ... since I am using the CLANG compiler to produce a 32-bit C++ application.

I have installed madExcept and enabled it under Project > madExcept Settings.

However, when I build the application, I get the following linker error:

[ilink32-10.1 Error] Fatal: Unable to open file 'MADZIP.OBJ'

I cannot find madzip.obj anywhere.

What am I doing wrong?

Any help would be much appreciated.

Thanks!

Andrew Bond
Geocentrix
 
Posts: 5
Joined: Wed Apr 12, 2017 11:47 am

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby madshi » Wed Apr 12, 2017 1:23 pm

By default the linker should be able to find all the necessary files automatically. For some reason that doesn't seem to work in your case. If you open "madZip.h", you'll see this:

Code: Select all
#pragma link "madZip"
#include "madZip.hpp"


I'm not completely sure where BCB gets the code from. Is it the "madZip.obj" file? Or is it the "madBasic_.lib" file? Both seems possible, I'm providing both.

My best guess is that in your setup, for some reason the path to "madCollectionRoot\madBasic\BDS18\win32" is not in the path list your linker searches through. Maybe CLANG uses a different library path setting?
madshi
Site Admin
 
Posts: 9442
Joined: Sun Mar 21, 2004 5:25 pm

Re: C++Builder 10.1 Berlin cannot link to madzip.obj

Postby Geocentrix » Wed Apr 12, 2017 2:08 pm

madshi wrote:... Maybe CLANG uses a different library path setting?


You've solved it!

Yes, the 32-bit CLANG compiler uses its own settings under Tools > Options > C++ Options > Paths and Directories.

The path to madBasic is written to the "Classic Compiler" (i.e. BCC) settings duting installation of madExcept but not to the "Compiler" (i.e. CLANG) settings.

I have therefore explicitly added the paths to madBasic, madDisAsm, and madExcept to my projects and it now compiles and runs!

Thanks.

Andrew
Geocentrix
 
Posts: 5
Joined: Wed Apr 12, 2017 11:47 am

Re: C++Builder 10.1 Berlin cannot link to madzip.obj [solved

Postby madshi » Wed Apr 12, 2017 2:10 pm

Glad to hear that! :)
madshi
Site Admin
 
Posts: 9442
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 2 guests