Pelles C forum
C language => Beginner questions => Topic started by: t57042 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
-
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
-
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
-
Try this first:
polib.exe test.obj /OUT:test.lib
and tell us what happens?
From help:
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.
-
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.
-
Try this first:
polib.exe test.obj /OUT:test.lib:
POLIB: fatal error: Invalid machinetype in object 'test.obj' .
-
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 (http://www.magma.ca/~wjr/PEview.zip)
-
First bytes are 80 08
-
So it is OMF-type object-file and polib.exe uses PE-COFF.
-
Do you know a program that can I make the conversion?
Thanks
Richard
-
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...
-
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 (http://purebasic.com/) 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
-
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 (http://purebasic.com/) there... ;)
OOPS... my bad.
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.