Jump to content
TotteKarlsson

[ilink32 Error] Fatal: Unable to open file 'DATA.OBJ'

Recommended Posts

I am restructuring a project (a VCL Forms application) to use bcc32c instead of the classic compiler.

 

I'm stuck at this linker error:

[ilink32 Error] Fatal: Unable to open file 'DATA.OBJ'

 Anyone knowing what library I should/could add in the following pragma.

#pragma comment(lib, "the-import-lib")

 

Or if there is another way to find out where the linker error comes from.

Edited by TotteKarlsson

Share this post


Link to post

I would assume that the library paths for bcc32c are different from the paths for the classic compiler.

You could compare the arguments passed to ilink32 in both settings.

 

HTH, Hans

Share this post


Link to post
On 3/23/2021 at 11:03 AM, weirdo12 said:

Did you search your code for #pragma link "Data"?

I did. Not to be found anywhere. This problem popped up while reorganizing code into several individual packages. 

 

I do believe I got this fixed by changing my own pragmas.

 

This 'type' ( no lib extension,

#pragma comment(lib, "bindcomp")

into this

#pragma comment(lib, "bindcomp.bpi")

 

I suspect using the first #pragma links static libs into the package, which could be fine. But then, when a package links to a package that have statically linked  packages, I get linker errors.


Wonder why the linker can't reveal the reference?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×