Build question: 
Author Message
 Build question:

Hi,all:
 When I build the program(win32 Release),it produce the
warning:LINK:warning LNK4089:all references to "SHELL32.dll" discarded by
/opt:REF.Do you know why?


Sat, 26 Mar 2005 21:08:06 GMT  
 Build question:
Shell32.lib is on the list of import libraries to link with, but you
don't actually use any function from it. The warning is harmless and can
be safely ignored, or you can go to Project | Settings | Linker and
remove shell32.lib from the list.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,all:
>  When I build the program(win32 Release),it produce the
> warning:LINK:warning LNK4089:all references to "SHELL32.dll" discarded
by
> /opt:REF.Do you know why?



Sat, 26 Mar 2005 22:55:45 GMT  
 Build question:
hi,
   Actually it means that there was a function somewhere in your code,
or in
a library that you linked with, that called something in SHELL32.dll.
That function wasn't called, so it was discarded, along with
SHELL32.dll. This is why u get the warning. In release mode, the
compiler automatically removes anything that is not explicitly
referenced. To disable this behavior use /OPT:NOREF as a linker
option. Debug mode does this on its own. Go to the Project
Settings->Link tab, and remove shell32.lib from the import libraries
boxfor release build).

Rgds,
Sharad Ganesh

Quote:

> Hi,all:
>  When I build the program(win32 Release),it produce the
> warning:LINK:warning LNK4089:all references to "SHELL32.dll" discarded by
> /opt:REF.Do you know why?



Sun, 27 Mar 2005 05:24:58 GMT  
 Build question:


Quote:
> hi,
>    Actually it means that there was a function somewhere in your code,
> or in
> a library that you linked with, that called something in SHELL32.dll.
> That function wasn't called, so it was discarded, along with
> SHELL32.dll. This is why u get the warning. In release mode, the
> compiler automatically removes anything that is not explicitly
> referenced. To disable this behavior use /OPT:NOREF as a linker
> option. Debug mode does this on its own. Go to the Project
> Settings->Link tab, and remove shell32.lib from the import libraries
> boxfor release build).

> Rgds,
> Sharad Ganesh



>> Hi,all:
>>  When I build the program(win32 Release),it produce the
>> warning:LINK:warning LNK4089:all references to "SHELL32.dll"
>> discarded by /opt:REF.Do you know why?

Hi:
 In my project,the Project setting->Link tab hasn't the shell32.lib.


Sun, 27 Mar 2005 09:45:05 GMT  
 Build question:


Quote:
>  In my project,the Project setting->Link tab hasn't the shell32.lib.

The link list isn't the only thing searched by the linker for .lib's. There
is a set of  "default' libraries of which shell32.lib is one. You can verify
this by choosing a project that is compiling/linking correctly and deleting
every .lib (as supplied by MS) in the linklist. Cut & save the list
somewhere just in case. Recompile. voila. no difference.

 If you check the "Ignore default libs" then the "default" libraries are not
searched.

The only reason I can come up with that the wizard puts those libs in there
is so that when someone checks the "Ignore default lib" button, their app
still links and so they don't call Microsoft support.



Sun, 27 Mar 2005 23:12:05 GMT  
 Build question:


Quote:



>>  In my project,the Project setting->Link tab hasn't the shell32.lib.

> The link list isn't the only thing searched by the linker for .lib's.
> There is a set of  "default' libraries of which shell32.lib is one.
> You can verify this by choosing a project that is compiling/linking
> correctly and deleting every .lib (as supplied by MS) in the linklist.
> Cut & save the list somewhere just in case. Recompile. voila. no
> difference.

>  If you check the "Ignore default libs" then the "default" libraries
>  are not
> searched.

> The only reason I can come up with that the wizard puts those libs in
> there is so that when someone checks the "Ignore default lib" button,
> their app still links and so they don't call Microsoft support.

Hi,Johna
 If I use some default libraries and delete the other libraries(which
aren't in the link list),how I do?


Mon, 28 Mar 2005 15:20:38 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Makefile Build questions

2. Custom Build question...

3. Build question regarding distribution of our libraries

4. build question

5. MFC Interface building question.

6. Release build question

7. Build questions

8. A question concerning building wizard-like interfaces in c#

9. newbie : debug build and pdb questions

10. question on building winsock program

11. "Special Build" questions with VC

12. custom build rule question

 

 
Powered by phpBB® Forum Software