Bugs item #1614318, was opened at 2006-12-12 11:28 Message generated for change (Comment added) made by ziktar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1614318&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: 0.85 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nick Lassonde (ziktar) Assigned to: Nobody/Anonymous (nobody) Summary: VC++ default libs included twice Initial Comment: VC++ automatically includes a handful of libraries (such as kernel32.lib and user32.lib. When building a Unicode app for 9x, you must include unicows.lib before these libraries. As such, MSDN suggests that you set IGNOREDEFAULTLIB: on those, and then add a reference to unicows.lib followed by references to kernel32.lib, et al. Visual Studio will then link in the proper order. However, Nant always adds the default libs first, and then any libs that you've chosen to link to. The following code change makes it only add default libs if the lib is not in the list of additional dependencies. (I hope this looks alright...) In Nant.VSNet\VcProject.cs change: if (addDeps.ToLower(CultureInfo.InvariantCulture).IndexOf(noinherit) == -1) { foreach (string defaultLib in _defaultLibraries) { linkTask.Sources.FileNames.Add(defaultLib); } to: string[] addDepsArr = addDeps.Split(' '); if (addDeps.ToLower(CultureInfo.InvariantCulture).IndexOf(noinherit) == -1) { foreach (string defaultLib in _defaultLibraries) { bool alreadyAdded = false; foreach (string addDep in addDepsArr) { if (0 == String.Compare(addDep, defaultLib, true)) { alreadyAdded = true; break; } } if (!alreadyAdded) { linkTask.Sources.FileNames.Add(defaultLib); } } ---------------------------------------------------------------------- >Comment By: Nick Lassonde (ziktar) Date: 2006-12-13 08:36 Message: Logged In: YES user_id=307317 Originator: YES I could create a project for you, but it's not quite that simple. The project will build successfully, and will run fine on Windows NT/2K/XP/Vista, but will fail to run on Windows 95/98/ME. I don't know if your test suite includes the ability to run applications on Win 9x. If it does, I can go ahead & create that project for you. Let me know. ---------------------------------------------------------------------- Comment By: Gert Driesen (drieseng) Date: 2006-12-12 20:49 Message: Logged In: YES user_id=707851 Originator: NO Nick, do you have a small repro (solution/project) that fails to build without this fix ? That way, I can add it to my local test suite to ensure it does not regress in the future. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1614318&group_id=31650 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers