Solved

problem linking with m68k-palmos-gcc

Posted on 2004-10-15
2
528 Views
Last Modified: 2013-12-27
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
Comment
Question by:martin11_ar
2 Comments
 
LVL 6

Expert Comment

by:vadim_ti
ID: 12330288
m68k-palmos-gcc -o 1.o 2.o ... n.o Symbol/lib/libScanMgr.a
0
 
LVL 3

Accepted Solution

by:
olan75 earned 125 total points
ID: 12466702
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now