Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Problem with linking - can't find the right solution.

Reply
Thread Tools

Problem with linking - can't find the right solution.

 
 
emer@hotbox.ru
Guest
Posts: n/a
 
      03-12-2006
Hi to everybody. I al tired of correcting the following error, probably
you can help me.
I am write a 16-bit application for Windows 3.1 using Borland C++ 5.02.
I am developing an application for ISA DLL driver for some equipment
and I have this DLL. I obtained the LIB static library from it using
IMPLIB, but as soon as I try to use functions from it I get the
message: 'Unresolved external ...'. I have tried all means: I put the
LIB into the LIB path and directory of compiler, used make file and so
on, but the compiler does not see the library derived from DLL. I cant
make it work!
I write the following code (simplified):

#include <windows.h>
#include "inc\8112.h"

void main (void)
{
W_8112_Initial(1,0x220);
return;
}

My header file (8112.h) is the following (truncated):
#ifdef __cplusplus
extern "C" {
#endif
....
int FAR PASCAL W_8112_Initial( int card_number , int base_address );
....
#ifdef __cplusplus

}
#endif
#ifdef __cplusplus

Do you have any ideas? How to force the compiler use the library? Or
may be modify the library? I have NO ideas, because I have tried
everything.

 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      03-12-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) writes:
> Hi to everybody. I al tired of correcting the following error, probably
> you can help me.
> I am write a 16-bit application for Windows 3.1 using Borland C++ 5.02.
> I am developing an application for ISA DLL driver for some equipment
> and I have this DLL. I obtained the LIB static library from it using
> IMPLIB, but as soon as I try to use functions from it I get the
> message: 'Unresolved external ...'. I have tried all means: I put the
> LIB into the LIB path and directory of compiler, used make file and so
> on, but the compiler does not see the library derived from DLL. I cant
> make it work!


This is off-topic. Everthing you're talking about is system-specific.
You should ask in a newsgroup that deals with your compiler and/or
operating system.

> I write the following code (simplified):
>
> #include <windows.h>
> #include "inc\8112.h"


'\' characters in string literals can be problematic -- but the
argument to a #include directive isn't, strictly speaking, a string
literal, even though it looks like one. You might want "inc\\8112.h",
or perhaps even "inc/8112.h". (Or the single '\' might be ok on your
system.


> void main (void)


int main(void)

> {
> W_8112_Initial(1,0x220);
> return;


return 0;
> }

[snip]

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
Q: can't find C++ symbols if gcc linking with Sun C++ library Albert C++ 4 09-29-2003 04:03 PM
pythong program install: linking cannot find -lpython2.3 Jari Aalto+usenet Python 0 08-19-2003 05:25 AM



Advertisments