Pelles C forum

C language => Beginner questions => Topic started by: Yadav on May 20, 2013, 07:06:36 PM

Title: RS232 communication using Pelles C
Post by: Yadav on May 20, 2013, 07:06:36 PM
Hi Folks,
              I was trying to communicate my microcontroller with my PC using RS232 protocol. I found the code attached with the post on the web and thought it was pretty good for a start and tried to compile it but I am getting the following errors. Kindly help!!!!! :-X

POLINK: error: Unresolved external symbol '_RS232_OpenComport'.
POLINK: error: Unresolved external symbol '_RS232_PollComport'.
POLINK: fatal error: 2 unresolved external(s).
*** Error code: 1 ***
Title: Re: RS232 communication using Pelles C
Post by: czerny on May 20, 2013, 11:19:04 PM
where is your main()?
Title: Re: RS232 communication using Pelles C
Post by: Bitbeisser on May 21, 2013, 01:50:21 AM
First off all, there is a simple way to include all project files into a single ZIP file to upload to the forum... ;)
(right-click on the executable name in the right-hand project pane and select "ZIP project files")

That said, as czerny already mentioned, the .c file is incomplete, as a matter of fact, pretty much all the code in it is irrelevant as it is within the huge #ifdef Linux section....

In general, as Pelle's C is a Windows only compiler, you need to look for Windows specific API's to access any serial port, as you do not have direct hardware access to any of the required ports...

Ralf
Title: Re: RS232 communication using Pelles C
Post by: Yadav on May 21, 2013, 04:08:38 AM
M sorry guys I dono H i missed my main function..... ::) I have attached the main function in the post.
Title: Re: RS232 communication using Pelles C
Post by: frankie on May 21, 2013, 01:43:15 PM
Try this project Serial Port Control by DMac (http://forum.pellesc.de/index.php?topic=2994.0)
Title: Re: RS232 communication using Pelles C
Post by: Yadav on May 22, 2013, 07:00:20 AM
Thx frankie. I shall try the code in the link.