Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
a matter of friends would like to help please Can they help with information on this subject ?
I want to control a relay through the parallel port from the c programming language I'm very limited time .
I wrote my program , it gives me the following error: source file not compiled . After the said period confirms saying while they say. If this issue can share in the hands ofthe relevant C code field
Thank you in advance
Posted
Comments
Member 11380960 17-Jan-15 9:27am    
ı get it . but ı did you says evrything. give me agaın this problem .
can you give me example software . pleace

If your error message is:
source file not compiled
Tehn that doesn't have anythign to do with programming the parallel port - it's a fundamental problem in that you haven't followed the "programming cycle" properly:

1) Design the application
2) Code - edit the source files and write or modify code.
3) Compile. If it fails, edit your code at (2) and try again.
4) Run.
5) Test. If it fails to do what you want exactly, go back to (2) or (1) and change it.
6) Publish.

In this case, it's very likely that either you didn't compile it, or it had compilation errors which meant that it couldn't compile successfully.
So check your compilation: if there are any messages, read them. Then act on them to fix your code. When you have it compiling cleanly, then you can run it and see if it works.
It's a bit like driving to the shops: if you leave the key at home, or don't have any fuel you can't start driving until you fix that. "No key" and "No fuel" are examples of "driving compilation errors" which prevent you running the "drive to the shops" application!

We can't do that for you, or even tell you what to do - we can't see your screen, access your HDD, or read your mind.
 
Share this answer
 
I suggest you to control the relay(s) with a microcontroller and then make the PC communicate with the microcontroller via serial port (or virtual serial port on the USB).
 
Share this answer
 
XML
#include <stdio.h>
#include <dos.h>
#include <conio.h>


void main (void)
{
clrscr();             /* clear screen */
outportb(0x378,1); /* output the data to parallel port */
getch();              /* wait for keypress before exiting */
}
i vritten this sourch code 
C program give me error (sourch file is not compiled)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900