| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Obj Files And Guidelines |
EB> I am desperately hoping somebody that can help me with this problem.
EB>
EB> I am trying to access an external function, ReadPort, which is
EB> contained in this source file "codeit.c": (Please note: I
stripped the
EB> function of a lot of code during my testing, just trying to get it to
EB> work.:) (Dont worry, its short):
EB>
EB> Here's the problem. I compile it into codeit.obj and then copy it to
EB> the guidelines directory, \guide\sys\ and I get the following error
EB> when guidelines goes to link:
EB>
EB> 2029 unresolved external ReadPort() in Infinity.CPP
EB>
EB> codeit.obj is correctly being incorporated into Link386. Also, if I
EB> try to use IMPLIB instead, Link correctly tries the .LIB file but no
EB> matter what, the above function cannot be found.
EB>
EB> Is it wrong for me to be using a C function OBJ with a C++ program?
EB> What could I be doing wrong? (BTW, the source for openport.h is
EB> simply:
The name is getting mangled in your source. To prevent mangling use the
following construct:
extern "C" {
short ReadPort(void);
}
David Johnson
* A nose in artificial manure is not studying nature.
___
* RoseReader 2.50* P004198
--- Silver Xpress Mail System 5.03P1
* Origin: Programmer's Guild BBS, Hamilton, Ont. (1:244/317{at}fidonet.org)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430 SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 244/317 300 99 12/12 270/101 396/1 3615/50 229/2 12/2442 @PATH: 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.