|
I'm testing my parallel port with the Borland C 5.5 compiler:
.....
.....
.....
while(!kbhit())
{
int data;
data=(inp32)(PORT+1);
gotoxy(3,10);
printf("Data available in status register: %3d (Decimal), %3X (hex)\n", data, data);
printf("\n Pin 15: %d",(data & 0x08)/0x08);
printf("\n Pin 13: %d",(data & 0x10)/0x10);
printf("\n Pin 12: %d",(data & 0x20)/0x20);
printf("\n Pin 11: %d",(data & 0x80)/0x80);
printf("\n Pin 10: %d",(data & 0x40)/0x40);
delay(10);
}
When I compile the program, it gives the following error:
Error: Unresolved external '_delay' reference from location
What is the use of delay(10) and gotoxy(3,10) in the program? Please advice.
Thank You
-- modified at 10:43 Wednesday 15th March, 2006
|
|
|
|
|
I have compiled a VC6.0 project under VS2005 and it compiles fine but when I try to run it on a machine that doesn't have VS2005 installed it comes up with:
"This application has failed to start because the application configuration is incorrect. Reinstalling the apllication may fix this problem."
So I guess that a single executable is no longer enough. What else do I need?
Any help is greatly appreciated.
I'm pretty sure I would not like to live in a world in which I would never be offended.
I am absolutely certain I don't want to live in a world in which you would never be offended.
Dave
|
|
|
|
|
provides the correct dlls with your application...
ps: did you notice that you were writing in a managed C++ forum ?
your question seems to have nothing to deal with MC++ code as it comes from VC6. so, next time, please post on the correct forum. thanks
|
|
|
|
|
Thanks - how do I determine which DLLs it needs?
re P.S.
Which forum would you recommend? Is this a problem with managed C++? .NET framework? Soapbox?
I couldn't decide so I took a shot at the one I thought might have people responding who have run into this problem before.
I'm pretty sure I would not like to live in a world in which I would never be offended.
I am absolutely certain I don't want to live in a world in which you would never be offended.
Dave
|
|
|
|
|
|
The Managed C++ forum is for managed C++. Unless you created a new project, your project is not MC++, by definition, so the Visual C++ forum is the one you wanted.
If your app uses MFC, you need the MFC 8 dlls. If you use the C run time, you need the MSVCRT 8 dlls. To add insult to injury, these dlls require installation in the WinSXS directories, I believe.
There used to be a tool called 'depends' ( from memory ) which told you what your app needed. I think it came with VC6, so you probably have it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks - sorry about the wrong forum.
I'm pretty sure I would not like to live in a world in which I would never be offended.
I am absolutely certain I don't want to live in a world in which you would never be offended.
Dave
|
|
|
|
|
DRHuff wrote: sorry about the wrong forum.
That's cool. I only commented in depth to answer your question to another reply, and I'd only mention it because the right forum will get you a better hit rate for answers. The only 'wrong' forum that's a sin to post to here is the lounge ( that is, with programming questions )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
After I Build it ,It says:
"LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/my_c.exe : fatal error LNK1120: 2 unresolved externals" while no error(s) and no warning(s) when I Compiled it.
Thanks for help!
|
|
|
|
|
Make sure your linker directories are set right, and that LIBCD.lib is avail for your linker.
|
|
|
|
|
I want to start using a .NET dll in my “old” MFC project. How do I create a managed class member inside an unmanaged class?
Here is an example of my h-file:
#pragma once<br />
class CViewerVS8_TestProjectDlg : public CDialog<br />
{<br />
…<br />
private:<br />
CDBLibHandler^ db = gcnew CDBLibHandler();<br />
};
… and I got the compiler error: error C2143: syntax error : missing ';' before '^'
_____________________________
...and justice for all
APe
|
|
|
|
|
Here is the right error message:
error C3265: cannot declare a managed 'db' in an unmanaged 'CViewerVS8_TestProjectDlg'
_____________________________
...and justice for all
APe
|
|
|
|
|
|
Heyas all,
I've added a new form to my project called ExitForm. In the main form of the project I've added #include "ExitForm.h". I'm trying to do the following:
<br />
void onSomeEvent(object^ sender, EventArgs^ e)<br />
{<br />
ExitForm^ eForm = gcnew ExitForm();<br />
eForm->ShowDialog();<br />
}<br />
I get ExitForm: undeclared identifier
Can anyone shed some light on what I'm forgetting to do to make ExitForm visible to other files in the project?
Thanks,
John
|
|
|
|
|
I don't see any problem with your code.
do you have in ExitForm.h:
public ref class ExitForm : public System::Windows::Forms::Form
or did you define namespace?
|
|
|
|
|
Yes, the form was created by visual studio, so the namespace is correct, and the form is inherited correctly.
This is driving me nuts!
Thanks,
John
|
|
|
|
|
Did you have any syntax problem in ExitForm.h?
If no then delete/remove ExitForm.h And Recreate
|
|
|
|
|
OK, I deleted all files pertaining to my form, and recreated, then deleted all precompiled headers etc. and now it works perfectly. that is rediculous. grrr
thanks a ton for your help though
Thanks,
John
|
|
|
|
|
i tried to run C++ using VS.net but it start to compile with error -- fatal error has occured, it there any other way to run normal C++. thanks
|
|
|
|
|
pete0 wrote: i tried to run C++ using VS.net
What does that mean ?? C++ is just a programming language so you cannot 'run' it. You mean you tried to compile one of your program with .NET ?
pete0 wrote: fatal error has occured
What is fatal error ?
Could you be more specific ?
|
|
|
|
|
i have a program me a troble since i am new to c++ programming before i send any over , are cool to help me.
|
|
|
|
|
i have a program troubling me. i have cracked my head at it all day but to no avail. can help
|
|
|
|
|
It would help a lot if you could give us a CLEAR explanation of your problem.
|
|
|
|
|
this program accept user input like an app-oin-tment book, at the moment can only take one date. i am just learning the programming ,it wil be great
the prog. is as follows:
#include "stdafx.h"
#using <mscorlib.dll>
using namespace std;
class Day{
private:
int day,month,year;//Date
public:
Day(int,int,int);//Constructor
~Day();//Destructor
void display();
};
Day::Day(int d,int m,int y){//Pass date to constructor
day=d;month=m;year=y;//Set the date
}
Day::~Day(){}
void Day::display(){
std::cout<<day<<' '<<month<<'="" '<<year<<std::endl;="" display="" day
=""
}
int="" main(){
="" int="" d,m,y;
="" std::cout<<"please="" input="" the="" date="" :\n";
="" std::cin="">>d>>m>>y;
Day MyDay(d,m,y);//Create a day
do{
MyDay.display();
}
}
|
|
|
|
|
sorry guys
what the programm does it suppose to take multiple date from users.
eg 12/12/2006
13/12/2006
14/12/2006
and so on.
|
|
|
|