|
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
|
Hi,
I am trying to compile the custom created MFC Activex control for my Applciation, I am getting following Errors:
Plz help me how to overcome this..
error LNK2005: ___CppXcptFilter already defined in msvcrtd.lib(MSVCR71D.dll)
warning LNK4006: ___xc_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
warning LNK4006: ___xc_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
warning LNK4006: ___xi_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
warning LNK4006: ___xi_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
warning LNK4006: ___CppXcptFilter already defined in msvcrtd.lib(MSVCR71D.dll); second definition ignored
warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
With reg,
Subbu
|
|
|
|
|
You might want to check the LIB files you are linking to. One of the ways that this can happen is if you link to a static library which was in turn built statically linked to a CRT. So now, you've got 2 copies of the CRT that you are linking against - causing the multiple definition errors.
If the other library you are linking to is under your control (i.e. you have the source and can build it), then see if you can get it to link dynamically to the CRT as well. If it isn't, well, then its a bit tricky. You might have to tinker with the /NODEFAULTLIB option and try to use the CRT that comes with the 3rd party LIB.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
spalanivel wrote: Plz help me how to overcome this..
You can start with these:
LNK2005
LNK4006
LNK4098
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I use evc++ extensively, which is sufficiently close to VC 6.0 that I think I am safe asking this question. I have a relatively large project - 600+ files - and I've started having to rebuild all files when I change targets. For some reason the ide / nmake decides I've changed something very important. Any ideas as to tracking down what file is triggering this?
chg
Charlie Gilley
Will program for food...
|
|
|
|
|
I also use EVC 3.0 and 4.0 with similar sized projects. Unfortunately what you're experiencing is normal as far as I can tell. When you change targets you're changing SDKs, derived from the different builds of CE with different BSPs. Any headers from the CE build used in your project, and there's almost bound to be some, will therefore change and if they're globalish headers everything will want rebuilding. You may be able to mitigate this a little by carefully trimming your #include inclusions but a full rebuild is still going to be needed in a lot of cases. Add to thi the known issues with the mostly failed attempt at an incremental linker that comes with EVC4/MSVC6 and you're probably better off wiht a full rebuild anyway. Good luck
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I'm at 4.1 and 5.0. Although I understand what you are saying, the target files are split according to SDK/target, and this *was* working in the past. It's just recently the thing has become possessed and insistent on rebuilding every dang file. It tasks me.
I'll keep looking, I know I'm going to have to go into the command line and run nmake manually to see what is going on. If I learn anything useful, I'll post it back here.
Charlie Gilley
Will program for food...
|
|
|
|
|
If nmake doesn't cough up useful results take a look in EVC under Tools, Options in the Directories Tab and make sure the folders for each Platform are correct for each type of directory and the lists are in order of precedence. This information is not saved in the workspace, it's IDE config in EVC4 and MSVC6 and can seriously screw up your projects if it's wrong. I hope you can crack it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
What do you mean by "switch targets"?
As for the nmake aruments, -n and -m are the ones I think you want and pipe the output to a file. Another is -B to force a full build; a test I do is build with -B then without and if the second does anything I look further. Occassionaly we get problems with the system clock on different system and around when daylight savings time changes.
|
|
|
|
|
hard to explain w/o a screen shot. In vs, let's say you can build for release or debug. Well, in evc++, the ide targets platforms - say x86 and ARM (different processors). Under each platform, you can have a release and debug.
For example, in my case, I have two platforms and two targets for each platform - 4 possible executables.
I have to tear into the nmake and see what we've done to the dependencies to trigger this....
Charlie Gilley
Will program for food...
|
|
|
|
|
charlieg wrote: Any ideas as to tracking down what file is triggering this?
Doesn't nmake.exe have some sort of command-line switch that shows what files are out-of-date but doesn't actually build them?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, it does. I didn't want to go there just yet . Looks like I have to.
Charlie Gilley
Will program for food...
|
|
|
|
|
In a flash of inspiration (meaning I decided to stop being stupid), I recovered a backup copy of my project. It behaves as it should - I can switch targets, and it does not cause a complete re-compile. So, something broke between then and now. Just have to find it.
Charlie Gilley
Will program for food...
|
|
|
|
|
Debugging 101 - change one thing only, see what happens.
What burned me is that I have a header file with version information in it. This header file is clearly documented to be used sparingly. I made a minor change, and since it coincided with a rebuild, did not notice the behavior for a while.
So, nothing wrong with EVC++, it is doing exactly what it is supposed to do.
Charlie Gilley
Will program for food...
|
|
|
|
|
|
jackey_chan wrote: Can someone help me please?
private: System::Void textBox1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
MessageBox::Show( "Yes or no?",
"Choose", MessageBoxButtons::YesNo);
I think you may need to ask here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am a VC++ pgmmer and using VS2005 IDE.
Whenever i am creating the New class through Project -> Add Class Menu.
I want to add my signature ( Name, Date of creation, ...) automatically at the top the of that class.
I do not have any idea , how to proceed.
Please throw some light on it.
Thanks in advance
Karthi....
|
|
|
|
|
On the VS menu choose Tools/Macros/Macro Explorer
led mike
|
|
|
|
|
Hello led Mike,
Do I have to create a macro for adding signature.
If I created a macro ,Does that macro triger(invoked) autmatically ,
when i am clicking Project-> Add Class Menu.
Am i clear in explaining the task?
Thanks in Advnace,
Karthi
|
|
|
|
|
Windows Pistha wrote: Do I have to create a macro for adding signature.
There might be other approaches. The capability of the IDE changes with each version, I don't keep up with that. I merely suggested one solution to your request. If you want to be thorough, the only thing I would suggest is reading the documentation for Visual Studio and making a decision after you have a complete understanding of what the capabilities are.
led mike
|
|
|
|
|
Hi ,
Actually i created Add-in for adding signature to all the .cpp and .h files.
but the problem with that was , if u r having any third party class in workspace.
There also it is adding my signature .
but it should not , so i thought of creating tool which will add my signature while creating new classes thru Project->Add Class menu.
Anyway ,i will try to read the documentation.
if you found anyother way ,let me know.
Thanks,
Karthi
|
|
|
|
|
Hi all,
I am trying to convert my vc6 code to vc2005.
In my vc code i have used api like:-
FindResource
LoadResource
LockResource
so i wanted to know that in vc2005 we have some aletrnate api for these api or we use same....
Thanks in advance....
|
|
|
|
|
|
Also, those are Windows APIs - they have nothing to do with the
programming language version you are using.
Those APIs haven't changed in way over a decade (possibly since the beginning of
Windows' existence).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|