471,594 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

Linker warning about function ordering with VC.NET 2003

My project uses the /ORDER specifier to order functions as specified in file containing the decorated names of packaged functions (COMDATs). I am in the process of upgrading from VC6 to VC.NET 2003.

When linking a release build of my project VC.NET 2003, the following warning occurs for each function that is being ordered:

SUTL_X86OrderComdats.dat : warning LNK4065: '?SUTL_SomeFunction@@YAXXZ' cannot be ordered; ignored

The help for warning LNK4065 suggests that function-level linking (/Gy) needs to be enabled. But when I checked this setting it is already enabled.

I do not receive the LNK4065 warning when building the debug configuration of my project.

Any ideas?

Thanks.
Nov 17 '05 #1
3 1798
Further to my above message, when I convert my project from VC6 to VC.NET 2002, the function ordering works properly

But when I then convert the project to VC.NET 2003, I get the above series of warning messages indicating the functions cannot be ordered

Does anyone have function ordering working with VC.NET 2003

Thanks.
Nov 17 '05 #2
--------------------

| Subject: RE: Linker warning about function ordering with VC.NET 2003
| Date: Tue, 10 Feb 2004 09:06:10 -0800

| Further to my above message, when I convert my project from VC6 to VC.NET
2002, the function ordering works properly.

But when I then convert the project to VC.NET 2003, I get the above series
of warning messages indicating the functions cannot be ordered.

Does anyone have function ordering working with VC.NET 2003?

Thanks.
|

Hi,

If you wouldn't mind putting together a link-repro for me and sending it
to: ka******@microsoft.com, I can get our linker devs to take a look at the
issue and to get back to you.

Here's how you make a link-repro, just in case you don't know how:

All linkers:
1. mkdir <some_dir>
2. set link_repro=<some_dir>
3. if you build from msdev, start msdev from the command where #2 was
performed.
4. run the offending link command
5. if you were in msdev, exit it.
6. set link_repro=
7. copy any of the compiler generated .pdb files that are necessary.

6.20 and later linkers:
1. mkdir <some_dir>
2. add /linkrepro:<some_dir> to the linker command line
3. run the offending link command
4. copy any of the compiler generated .pdb files that are necessary.
Thanks!

Kang Su Gatlin
Visual C++ Program Manager

Nov 17 '05 #3
I finally realized that I was using the 60-day demo version of VC.NET 2003, which apparently has certain optimizations disabled for release builds, including function ordering.

I successfully rebuilt the project using the full version of the compiler. Issue resolved.

Thanks anyway for your reply Kang.

Ryan
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by TGF | last post: by
reply views Thread by KS | last post: by
4 posts views Thread by Eric | last post: by
3 posts views Thread by Georg | last post: by
5 posts views Thread by Tanja Krammer | last post: by
2 posts views Thread by Oneironaut | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.