Hi,
I have a number of C++ solutions in Visual Studio .NET and when i compile them using "Whole Program Optimization", certain projects report a LNK1171 error saying that c2.dll could not be loaded. The error contains the correct path to c2.dll (and it is definately there).
This only happens on some projects and only when "whole program optimization" option is turned on. If i turn off this option, the problem goes away. I have other projects (in the same solution) and in other solutions, that work with the "whole program optimization" option turned on. Some of the projects that work are larger and some smaller than the projects that don't work, so it is not a size issue.
I have searched the newsgroups and the web and i could not find any solutions to this problem. (Although i did find other people reporting the same problem, eg in microsoft.publi c.dotnet.langua ges.vc newsgroup)
Is there any solution to this?
The version i'm using:
Microsoft Development Environment 2002 Version 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Thanks, 3 4142
>I have a number of C++ solutions in Visual Studio .NET and when i compile them using "Whole Program Optimization", certain projects report a LNK1171 error saying that c2.dll could not be loaded. The error contains the correct path to c2.dll (and it is definately there). This only happens on some projects and only when "whole program optimization" option is turned on. If i turn off this option, the problem goes away.
Dmitry,
Do you have a small(ish) project that you can use to demonstrate this
problem?
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Hi,
The smallest of the projects is around 1000 files, so i cannot demostrate this problem easily.
Nonetheless, i have found a solution to this - it seems to come from the order of libraries in the
Linker's "AdditionalDepe ndencies" field. Changing the order in which libraries are linked to the
project seems to fix the problem.
Eg if your project links against libraries a.lib, b.lib, c.lib, d.lib etc, then AdditionalDepen dencies would
contain "a.lib b.lib c.lib d.lib". Moving a.lib to the end of the list (to form "b.lib c.lib d.lib a.lib") would
probably fix the problem. If not, try repeating with the next library ("c.lib d.lib a.lib b.lib") etc. Following
this algorithm has fixed all three of my projects that did not work before.
Regards,
Dmitry
----- David Lowndes wrote: ----- I have a number of C++ solutions in Visual Studio .NET and when i compile them using "Whole Program Optimization", certain projects report a LNK1171 error saying that c2.dll could not be loaded. The error contains the correct path to c2.dll (and it is definately there).This only happens on some projects and only when "whole program optimization" option is turned on. If i turn off this option, the problem goes away.
Dmitry,
Do you have a small(ish) project that you can use to demonstrate this
problem?
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
>Changing the order in which libraries are linked to the project seems to fix the problem.
I think that's just as worrying as having the error in the first
place. It'd be good to get a repro for this situation to MS in order
to get it seen to.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jr |
last post by:
I am working in VC++ so this may be microsoft specific though I don't think
so. Excuse me if it is.
Assuming it isn't, can someone generally explain the purpose of having
both - is it purely a deployment/distribution thing.
I notice that the static library generates obj files and a Lib file. Could
someone kindly explain how they relate to one another.
Thanks very much
|
by: news.iq.ca |
last post by:
Hello.
I have created a class, "CompiledPage.vb", and I need to compile it. When I
run (using the VSNet Command Prompt):
____________________________________________________________
C:\Documents and Settings\Administrator>vbc /t:library /r:system.dll,
system.web.dll, "C:\Documents and Settings\Administrator\My Documents\My
Projects\ASPNETProjects\VSNet\CompiledForm\CompiledPage.vb"...
|
by: John Doe |
last post by:
Hi,
I've got the following error when building my ASP.NET application called
WebApplication1:
Preparing resources...
Updating references...
Performing main compilation...
error CS0006: Metadata file
'c:\inetpub\wwwroot\WebApplication1\bin\WebApplication1.dll' could not be
|
by: LBeveridge |
last post by:
Hi,
This morning I installed Visual Studio 2005 side-by-side 2003. The
first problem I've noted is that projects in 2003 that have "Start
External Program" set don't do that. I'm creating a DLL plug-in for
ArcMap (an ESRI product), so I set the external program to point to its
EXE.
When debugging, it shows the splash screen of the application it's
supposed to start, then bombs with no error message, and the debugging
stops (just...
|
by: topmind |
last post by:
I tried to install the sqlite extension to PHP using "php_sqlite.dll",
but I get the following error message:
PHP Warning: Unknown(): Unable to load dynamic
library './php_sqlite.dll' - Access is denied. in Unknown on line 0
I am using IIS on Windows XP for development only. It is Php version
4.3.2. I added all permissions I could, including "write". It is
finding the DLL okay because if I rename it I get a "not found" message...
| |
by: jobs239 |
last post by:
Can I use this line inside C program "system(java -jar <jarfilename>)"
to run a java program from C?
Or do I have to use some JNI interface.?
|
by: Chris |
last post by:
Hi,
I installed Visual Studio 2005 SP1, my application does not start on
machines without Visual Studio installed any more. It was working without
SP1.
After searching the web, it seems caused by manifest file, I changed link
option to generate external manifest file. The manifest lists dependency to
two version of CRTs, is that the problem and why it lists both?
|
by: Samuel R. Neff |
last post by:
When is it appropriate to use "volatile" keyword? The docs simply
state:
"
The volatile modifier is usually used for a field that is accessed by
multiple threads without using the lock Statement (C# Reference)
statement to serialize access.
"
But when is it better to use "volatile" instead of "lock" ?
|
by: Keith G Hicks |
last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher"
project. Starting and stopping the watcher and reading my XML file work
fine. Once the watcher is started, I'm reading the text files from the
watched folder line by line into variables and then posting them to a SQL
table.
All of the code for the form is shown below. And it works fine except for 2
issues.
First issue: In the Finally of the Try for teh SQL...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |