Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking problem

Status
Not open for further replies.

arihantj

Programmer
Sep 23, 2003
3
US
Hi,

I am planning to use the ddl solution from
I am using Borland C++ 5.0. Now I could compile the c source file, but it is giving me the following linking errors. Solver people have built the system with Visual C.

Now as I understand, since I am using a different compiler, I will need to re-build the .lib file which comes with the package. But I do not know the exact steps. I have also downloaded the Borland C++ 6.0 IDE as well, if that could make things simpler.

Thanks,
Arihant

Vcexamp1.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'getcallbackinfo' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'objsa' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'rhssa' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'setlpcallbackfunc' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'lpwrite' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'findiis' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'getiis' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'iiswrite' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'loadquad' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'optimize' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'setintparam' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'loadlp' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'loadctype' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'lpread' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'mipoptimize' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'solution' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
Error: Unresolved external 'unloadprob' referenced from D:\FRONTDLL\EXAMPLES\VCEXAMP\VCEXAMP1.OBJ
 
> Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Check the compiler documentation on how to produce a library. You should be running the librarian, not the linker.

I'm guessing that the IDE you're using has a project type called 'library', which you should choose, and then add all the source files which make up that library to that project.

At the moment, it seems you've chosen an 'executable' project.

--
 
Hi Salem,

Thanks for your response. There is an option for a New Project -> Liabrary in the IDE!

I am kind of new to C linking and probably will ask a couple of silly questions
- Solver people provide with a dll
- The example code has a .c file and a .h file
- A .lib file which they built with VC

Now when you say add the source files, what does that mean? dll or .c or .h or the existing .dll

Also if you could explain a brief concept of the .lib file

The command prompt for the tlib.exe (BC++ 5.0)shows
D:\FrontDLL\Examples\Vcexamp>tlib
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Syntax: TLIB libname [/C] [/E] [/P] [/0] commands, listfile
libname library file pathname
commands sequence of operations to be performed (optional)
listfile file name for listing file (optional)

A command is of the form: <symbol>modulename, where <symbol> is:
+ add modulename to the library
- remove modulename from the library
* extract modulename without removing it
-+ or +- replace modulename in library
-* or *- extract modulename and remove it

/C case-sensitive library
/PSIZE set the library page size to SIZE
/0 purge comment records

Use @filepath to continue from file &quot;filepath&quot;.
Use '&' at end of a line to continue onto the next line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top