I'm trying to access the serial port using the following sample code:
#include <stdio.h>
#include <conio.h>
int main(void)
{
unsigned port = 0;
int value;
value = outp(port, 'C');
printf("Value %c sent to port number %d\n", value, port);
return 0;
}
However, the linker kept on prompting : unresolved external '_outp'.
I'm trying Borland C/C++5. Is there any parameters to be set for the linker
? Or is there any other functions recommanded instead for reading/writing to
comm ports?
Thanks a million in advance!
regards,
Toraso
> To all the kind C/C++ experts out there,
>
> I'm trying to access the serial port using the following sample code:
>
> #include <stdio.h>
> #include <conio.h>
>
> int main(void)
> {
> unsigned port = 0;
> int value;
> value = outp(port, 'C');
> printf("Value %c sent to port number %d\n", value, port);
> return 0;
> }
>
> However, the linker kept on prompting : unresolved external '_outp'.
> I'm trying Borland C/C++5. Is there any parameters to be set for the linker
> ? Or is there any other functions recommanded instead for reading/writing to
> comm ports?
>
> Thanks a million in advance!
>
> regards,
>
> Toraso
<Jack>
#1. 0 is not a valid com port address.
#2. This is all platform specific and off-topic in this newsgroup
altogether.
#3. Borland 5 can make no less than five different types of programs
and you didn't say which type you were trying to make.
#4. Open the online help page for the function you are trying to use.
Click on the Compatibility link at the top of the page. If will tell
you what types of programs the function is available in.
#5. Go to http://www.borland.com. The Developer Support link will
take you to a page where you can access FAQs and TIs (Technical
Information documents) for your compiler. The newsgroups button will
show you the Borland support groups and how to access them.
</Jack>
--
Do not email me with questions about programming.
Post them to the appropriate newsgroup.
Followups to my posts are welcome.