NO

Author Topic: error when using polib  (Read 6754 times)

t57042

  • Guest
error when using polib
« on: October 13, 2011, 06:03:00 PM »
Hello,

I am trying to use POLIB (version 6.01.0) to make a .lib out of a .obj file, created with minigui.
I get following error message:

POLIB: fatal error : Invalid machinetype in object 'test.obj'

Any help?
thanks
Richard


CommonTater

  • Guest
Re: error when using polib
« Reply #1 on: October 13, 2011, 09:26:43 PM »
First... read up on POLIB in the help file ... help -> Contents-> command line tools -> polib

It would seem the /machine option is missing or incorrect on your POLIB command line... Your choices are

/MACHINE:X86
/MACHINE:AMD64
/MACHINE:ARM
/MACHINE:X64


t57042

  • Guest
Re: error when using polib
« Reply #2 on: October 14, 2011, 12:32:25 PM »
The problem is, I have no help file. Polib came with Purebasic.

My machine is X86 - windows7
The objectfile is test.obj and the lib should be test.lib

Can you give the syntax??

Thanks
Richard


Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: error when using polib
« Reply #3 on: October 14, 2011, 01:43:30 PM »
Try this first:
polib.exe test.obj /OUT:test.lib

and tell us what happens?

From help:
Quote
Create or modify a library with POLIB
 
You can use POLIB to create a library. When you do, use the following syntax:

POLIB filespec /OUT:library

The filespec argument specifies the name of one or more object files or libraries. Wildcards are allowed. If there are many files - use a response file.

The result will be written to the file named library.

You can remove members from a library with the following syntax:

POLIB library /REMOVE:member [/REMOVE:member ...]

The member name must be specified exactly as stored, but it is not case sensitive.
« Last Edit: October 14, 2011, 01:57:12 PM by timovjl »
May the source be with you

CommonTater

  • Guest
Re: error when using polib
« Reply #4 on: October 14, 2011, 02:12:51 PM »
The problem is, I have no help file. Polib came with Purebasic.

Why not just download Pelles C?  It's free and the help file is VERY complete.

t57042

  • Guest
Re: error when using polib
« Reply #5 on: October 14, 2011, 04:12:35 PM »
Try this first:
polib.exe test.obj /OUT:test.lib:

POLIB: fatal error: Invalid machinetype in object 'test.obj' .


Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: error when using polib
« Reply #6 on: October 14, 2011, 05:31:03 PM »
Next thing to do is examine that test.obj is proper object-file.
If you have hex-viewer, you can tell us what are first bytes of it.
For x86 they should be 4C 01 ( L and face).

Here is link for good PEView.exe to look into PE COFF files:
http://www.magma.ca/~wjr/PEview.zip
May the source be with you

t57042

  • Guest
Re: error when using polib
« Reply #7 on: October 14, 2011, 06:17:08 PM »
First bytes are 80 08

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: error when using polib
« Reply #8 on: October 14, 2011, 07:17:18 PM »
So it is OMF-type object-file and polib.exe uses PE-COFF.

May the source be with you

t57042

  • Guest
Re: error when using polib
« Reply #9 on: October 14, 2011, 07:32:49 PM »
Do you know a program  that can I make the conversion?

Thanks
Richard



CommonTater

  • Guest
Re: error when using polib
« Reply #10 on: October 15, 2011, 02:38:51 AM »
Do you know a program  that can I make the conversion?

First check your project types... make sure it's a windows project...

Also, I'd suggest heading over to the PowerBasic forums and informing them of the bug in their compiler...




Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: error when using polib
« Reply #11 on: October 16, 2011, 12:32:23 AM »
Also, I'd suggest heading over to the PowerBasic forums and informing them of the bug in their compiler...
I doubt he'll get much help for his PureBasic there...  ;)

Was actually more than surprised to see that PureBasic is even using/including some of Pelle's tools (POLINK, POLIB and PORC, with the first one v5.0, the other two v6.0),a s they are claiming to directly create executables...  ???

Ralf

CommonTater

  • Guest
Re: error when using polib
« Reply #12 on: October 16, 2011, 01:11:24 AM »
Also, I'd suggest heading over to the PowerBasic forums and informing them of the bug in their compiler...
I doubt he'll get much help for his PureBasic there...  ;)

OOPS... my bad.


Quote
Was actually more than surprised to see that PureBasic is even using/including some of Pelle's tools (POLINK, POLIB and PORC, with the first one v5.0, the other two v6.0),a s they are claiming to directly create executables...  ???

Even more interesting I'm hoping they've dealt with the copright issues...  I'd really hate to see Pelle get ripped off since that is a commercial product.