• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Help, wht is this error???




 Hi,

 i download a sample from MSDN. but when i compile it, it gives the error:

 Linking...
 LINK : fatal error LNK1104: cannot open file "uafxcwd.lib"
 Error executing link.exe.



 what is this error? and how to amend it?

 pls hlep!!
 thanks!
0
greenbird
Asked:
greenbird
  • 5
  • 5
  • 2
  • +2
1 Solution
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

Well, is that file exists with u in the C:\Program Files\DevStudio\VC\mfc\lib?. Is this path is specified to be build?. If it is not there, then U may have to copy it there from somewhere.
OR
If that sample contains that lib file, then copy it to the working directory.. Then go to the project settings and in the link tab, specify that name along with the path in the Object/library modules: section.

I dont think second situation exists. But take care of first one.
Try it out.
VinExpert
0
 
abancroftCommented:
That is the MFC debug UNICODE library. It is automatically linked by the MFC headers.

You didn't install the unicode version of MFC.

Try changing the active configuration to a non-unicode one (Build->Set Active Configuration...).
0
 
carldeanCommented:
Remove the _UNICODE preprocessor definition (Project\Settings\C++).  And then do a Rebuild All.

You'll then be using the non-unicode libraries which should be fine if all you've done is a typical VC++ installation.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
mikeblasCommented:
The more straightforward solution is probably to select a build target that doesn't mention "Unicode" in its name.

..B ekiM
0
 
abancroftCommented:
Thank's for vaildating my earlier comment!
0
 
mikeblasCommented:
> Thank's for vaildating my earlier comment!

No charge.

..B ekiM
0
 
greenbirdAuthor Commented:
hi, all,

thanks for all the help. however  after i change the Build->Set Active Configuration... to
Win32 Debug, it did not work, still got the error.
moreover, i can not find the _UNICODE preprocessor definition (Project\Settings\C++).

what is the reason?

thanks a lot!

Happy Chinese New Year! :)
0
 
mikeblasCommented:
> after i change the Build->Set Active Configuration... to
 > Win32 Debug, it did not work, still got the error.

How did you change it?  I suspect you didn't change it in the right place.

Can you provide the complete content of your build output window?

To which sample are you referring? Can you give me the URL you downloaded it from so I can try and reproduce the problem you're having myself?

..B ekiM
0
 
greenbirdAuthor Commented:
Hi,

the URL for the sample is:
http://msdn.microsoft.com/library/devprods/vs6/visualc/vcsample/_sample_mfc_cmnctrl1.htm

i change it this way:
Build->Set Active Configuration->win32 Debug

the error is:
Linking...
LINK : fatal error LNK1104: cannot open file "uafxcwd.lib"
Error executing link.exe.

CmnCtrl1.exe - 1 error(s), 0 warning(s)


thank u!
0
 
mikeblasCommented:
Why did you download this sample from the Internet when it's right on the VC++ product CD?

What you're doing should work. That you're getting this error indicates that you're either not really changing the active configuration, or that you're building all of the configurations.

Are you doing a batch build?

Please do a "rebuild all".

And, again, please show _all_ of the content of the output window.

..B ekiM
0
 
greenbirdAuthor Commented:
Hi,

well i am not able to install MSDN when i install VC++. so i have to download it from web.

isn't the output window the window which shows the compilation result? (the lowest window) then i had shown all of the content.

thanks a lot!
0
 
greenbirdAuthor Commented:
Hi,

forget to mention, now it works with rebuild all. thanks for the great help u had given!!!

and for carldean's answer, i can not find the preprocessor there. anyway thanks for all the replies!!

bye..
0
 
mikeblasCommented:
> so i have to download it from web.

No.  Just copy it from the SAMPLES directory on the product CD.  You can get all the samples from your MSDN CD in these directories

your_msdn_cd:\SAMPLES\VC98\MFC\...
your_msdn_cd:\SAMPLES\VC98\ATL\...
your_msdn_cd:\SAMPLES\VC98\SDK\...

 > (the lowest window) then i had shown all of the content.

No, you didn't.  There was more content; you need to scroll, or resize the window, or click on it and use the "Select All" command in the "Edit" menu.  You should've have also had output from compiling, and a header that confirmed which build you were making.  Like this:

--------------------Configuration: CmnCtrl1 - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
animctrl.cpp
CmnCtrl1.cpp
DateTime.cpp
MonthCal.cpp
mtreectl.cpp
notifwdw.cpp
propsht.cpp
toolbar1.cpp
toolbar2.cpp
toolpage.cpp
treecpg.cpp
Generating Code...
Linking...

CmnCtrl1.exe - 0 error(s), 0 warning(s)


..B ekiM
0
 
greenbirdAuthor Commented:
Hi,

thanks for ur help! i had learned a lot from u!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now