|
there is no main.c in my project. The line that is giving error is in a cpp file
|
|
|
|
|
subramanyeswari wrote: there is no main.c in my project
WTF is that :
"fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\main.c', line 148)"
if it's not a file you own, then look anyway at its line 148 to see what could make it crash from your code...
also, a little code sample could help maybe.
|
|
|
|
|
Have you seen this link[^]
Regards,
Rane
|
|
|
|
|
subramanyeswari wrote: Is there any way to correct this code without installing a hotfix?
I think you may have to install the hotfix provided by MS to resolve this issue.BTW,Why are you hesitating to install the hotfix?
Regards,
Rane
|
|
|
|
|
fatal error C1083: Cannot open source file: abc.cpp: No such file or directory
fatal error C1083: Cannot open source file: abc.cpp: No such file or directory
But this file is included before and then deleted from the projected and
#include "abc.cpp" is also deleted
I did clean Rebuild, but stil the same problme exist. Pls advice
|
|
|
|
|
Did you do a find for "abc.cpp" in the whole project?. May be you would be referencing the "abc.cpp" through some other header files...
Regards,
Rane
|
|
|
|
|
Yes yes I did, the included is cleaned from the whole project, even the word is not avaliable in the who project..
|
|
|
|
|
ptr_Electron wrote: But this file is included before and then deleted from the projected and
#include "abc.cpp" is also deleted
what ???
|
|
|
|
|
Are you sure you have this file? and "#include "abc.cpp" is also deleted"
|
|
|
|
|
Yes, how can I slove this, pls advice
|
|
|
|
|
Maybe the abc.cpp is still in the solution explorer?
In the solution explorer, open your project, open "Source", mark abc.cpp and hit the "del"-key.
Do the same under "Headers".
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Yes, yes I did that also, no abc.h and abc.cpp is not displayed in the work space
|
|
|
|
|
how come? right click on error list then choose go to location, this should bring you to the error location...
couldn't be like that... a bit strange...
|
|
|
|
|
What is the difference between a timer and a thread ?
Thanks,
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
a timer is a component that raises an event after a certain interval has passed and runs on the main thread. It just goes of somewhere and then after the specified inteval runs code that you would have specified.
A thread on the other hand is something totally different. A thread simply put is a process of execution. All applications execute on at least one thread.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks.. Can i have a detailed description.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
What do you need excatly?
|
|
|
|
|
_AnShUmAn_ wrote: a timer...runs on the main thread.
Timers are not limited to the main thread. They run on whatever thread they were started in.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
It is almost impossible to answer the question because they are two completely different things. That's a bit similar as asking "What's the difference between a table and an apple ?"
A timer is something that is fired at regular intervals and a thread is something that lets you execute code in parallel.
|
|
|
|
|
Thanks..
I got it.
Suppose If I have timer that gets fired every 1000 ms.
and the timer is calling a Sleep() for 10000 ms.
How this is going to behave ?
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
If you have only one single thread, it means that your application will hang when you are sleeping. If it is a user interface, it will be frozen during 10 seconds and each time new sleep messages will be put in the queue. It means that it won't react anymore (or very slowly, every 10 seconds, just the time to process the messages that are in the queue).
|
|
|
|
|
My question here is
Suppose in a timer function that gets fired every 1000 ms, another function fun() gets called,which takes some 10000ms to finish execution.
How this is handled ?
Every 1 s, the fun() gets called or it continues the previous execution every 1 s.
Thanks
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
No, I already answered your question: it will be called every 10 msec because you have only one single thread. A timer only post a message to your application message queue, which is handled in your main thread. It means that if your main thread is stuck 10 seconds in a specific function, no messages will be processed from the queue (even your timer message). So, your function will be called every 10 seconds only. There's no magic: if there's only one thread, you can only have one piece of code executed at a given time.
|
|
|
|
|
Ok.. I got it..
It is now clear.
Thanks
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
NiceNaidu wrote: Suppose If I have timer that gets fired every 1000 ms.
and the timer is calling a Sleep() for 10000 ms.
How this is going to behave ?
Why not write a program and find it out?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|