Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 545
  • Last Modified:

problem linking with m68k-palmos-gcc

Hello. I´m working on W2000 using cygwin.dll to compile with m68k-palmos-gcc. I had a problem because i had to use the ScanMgr library and that library provided with CodeWarrior is a .lib library and i didn't can link it.
Someone here (i forget his name) give me the libScanMgr.a library but i tried to compile with it using options -L and -l to set the complete path and the library file and every command that i try tells me:

/prc-tools/H-i586-cygwin32/m68k-palmos/bin/ld: cannot open -llibScanMgr.a: No such file or directory

or give me the complete list of undefined references like

C:\DOCUME~1\Martin\CONFIG~1\Temp/ccyt5xaY.o(.text+0x2ae):pscanner.cpp: undefined reference to `ScanIsPalmSymbolUnit(void)'

Can anybody tell me the exactly command that can link libScanMgr.a. ?
Remember that i tried the typical -L and -l options in conjunction.
Thanks
0
martin11_ar
Asked:
martin11_ar
1 Solution
 
vadim_tiCommented:
m68k-palmos-gcc -o 1.o 2.o ... n.o Symbol/lib/libScanMgr.a
0
 
olan75Commented:
Remember that gcc changes the name that you give on the command line:
for example -lFoo will cause gcc to link with libFoo.a

So assuming your lib is in the same directory as your object files, the
link line should have : -lScanMgr and NOT -llibScanMgr

However, you do not need the -l option.
You can link with a library by adding it directly to the command line as if it were another .o file

For instance:

m68k-palmos-gcc foo.o bar.o libScanMgr.a

would work (add other options to your liking). gcc looks at the extension and does the right thing.

This is better because that way you can specify
exactly THE lib you want, instead of relying on a path (a path is dangerous because you could
have several libs with the same name along the path, so you have to worry about
which one is first in the path...) .

If none of the above works then post your link line and explain your directory structure.

HTH
olan75

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now