|
Hi ,
when i am trying to build managed c++ project in visual studio .net 2003 , i am getting this kind of
description in output window,and not able to generate .exe.
Microsoft (R) .NET Resource Generator
[Microsoft .Net Framework, Version 1.1.4322.2443]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Usage:
ResGen inputFile.ext [outputFile.ext]
ResGen /compile inputFile1.ext[,outputFile1.resources] [...]
Where .ext is .resX, .txt, or .resources
Converts files from one resource format to another. If the output
filename is not specified, inputFile.resources will be used.
The /compile option takes a list of .resX or .txt files to convert to
.resources files in one bulk operation, replacing .ext with .resources for
the output file name.
.txt files have this format:
# Use # at the beginning of a line for a comment character.
name=value
more elaborate name=value
and I am getting warnings like this
XtendedMenu warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or at 'D:\HandHelld\projects\SVNRep-HandHeld\Trunk\QCID\Source\QCID\WIN\QCID\Release\libc.pdb'; linking object as if no debug info
NetSegmentedProgressControl warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or at 'D:\HandHelld\projects\SVNRep-HandHeld\Trunk\QCID\Source\QCID\WIN\QCID\Release\libc.pdb'; linking object as if no debug info
NetSRPControl warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
NetSRPControl warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or at 'D:\HandHelld\projects\SVNRep-HandHeld\Trunk\QCID\Source\QCID\WIN\QCID\Release\libc.pdb'; linking object as if no debug info
NetBarGraphControl warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
NetBarGraphControl warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or at 'D:\HandHelld\projects\SVNRep-HandHeld\Trunk\QCID\Source\QCID\WIN\QCID\Release\libc.pdb'; linking object as if no debug info
The application is not generating .resources files in release build, where as in Debug build , i am getting same warnings ,still able to generate .exe. In release build not able to generate exe and resource files (.resources from .resx)
Any help is greatly appreciated.
Thanks,
sharada veena.
|
|
|
|
|
hello
i have to deliver a project to the doctor and i need a simple program or rich example in vc++.net please
& thank u all
|
|
|
|
|
Nobody here has the time to do your work for you. If you need a sample of some type of coding then look at the articles here on CodeProject and also use Google/Bing to search the internet.
It's time for a new signature.
|
|
|
|
|
Hi,
I have written a piece of code to save data from a Windows form in a file, and to read it from the file back into the Windows form. This works fine on the computer on which I've written the code (Windows 7). However, now I try to run the program on another computer (Windows XP), and a strange thing happens: when I read the data from the file, a rectangle character appeard at the end of each line.
When I write the data to the file, another such character is written to the file. So every time I save and read a file, an extra rectangle character is added. I'm using streamwriter / streamreader for the file input / output. Any idea how to prevent this strange behaviour?
|
|
|
|
|
Can someone tell me how to use sizeof() during debugging by any means at all (watch, immediate window, etc...)? All I keep getting are stupid error messages. For instance, in the Immediate window I typed:
? sizeof(bool)
which gave me the message
error: identifier 'sizeof' out of scope
I can't seem to find documentation for this anywhere.
Thanks.
|
|
|
|
|
In C#, and in C++, sizeof is an operator, and not a function. It is something that is calculated at compile-time, and not at run-time. As such, the debugger does not know the sizeof operator, as it is a language-specific way of expressing an operator.
The way your type your expression, the debugger will interpret it as:
Call Debug.Print(sizeof(bool))
Since the sizeof function does not exist, you get an out of scope error message.
|
|
|
|
|
Xpnctoc wrote: All I keep getting are stupid error messages.
On the contrary, you are getting helpful error messages. You just need to use the information to help you figure out what is happening.
It's time for a new signature.
|
|
|
|
|
I have never done this before, but I'm going to have to disagree with nearly everything that has been put forth in the responses so far.
I created a new scratch C++/CLI project to see if there was a problem in the way my other C++ project was configured. However, using sizeof in the Immediate window continues to produce the "out of scope" error.
Then I created a new scratch C# project to put Michel's response to the test. When I type
? sizeof(bool)
in the Immediate window, it returns an output of "1". So whatever is going on with "sizeof" in C++/CLI is not extendable to C#.
Regarding Richard's comment about me calling the "out of scope" message stupid, I'm going to stand by what I said. "Sizeof" -- especially if Michel is right calling it an operator rather than a function -- is part of the language. It's not some custom function of some special class where an extra reference is needed. So how can it ever be out of scope? In that regard, the message makes no sense. Therefore it is utterly unhelpful. That makes it, IMHO, fully deserving of the label "stupid".
|
|
|
|
|
I still stand by my answer. In c#, the debugger can use the .Net compiler support libraries to compile your statement on the fly. In native code, there is no such thing.
I must admit that I've never tried it in C#, but in unmanaged C++, this behaviour is 'expected'.
Whether to label it stupid, is is entirely up to you.
|
|
|
|
|
But I'm not dealing with strictly unmanaged C++ anyway. My project is a "mixed mode" C++/CLI project. By definition, the project has to be .NET-aware. And the breakpoint that I set was actually in a managed code section (i.e., in one of the Windows Forms event handlers). So why can't it use the same .NET compilation support as C#?
Even if the project was 100% unmanaged, the compiler still has to convert a sizeof call into a useable via some kind of library. Why can't the debugger make use of that part of the compiler?
I don't label the problem itself as "stupid". I obviously don't understand it and was trying to get some clarification. What I do label as "stupid" is the "out of scope" error message. It just seems to me that there has to be a lot better/more helpful wording for when this error condition is encountered -- something like:
"'Sizeof' operator is unsupported in debugging."
If they had a truly informative error message like that, I wouldn't have had to start this post to begin with. It still wouldn't answer the "why" questions, but at least it would be a lot less cryptic than some vague "out of scope" message. After all, if sizeof is an operator rather than a function as you originally suggested, how the heck can an operator -- a built-in part of the language -- be out of scope?
|
|
|
|
|
Xpnctoc wrote: the compiler still has to convert a sizeof call into a useable via some kind of library.
No it merely calculates the size of the operand and puts the resulting value in the object code. There is no associated library call because sizeof() is an operator, just like + .
Xpnctoc wrote: If they had a truly informative error message
I think this rant should be directed at Microsoft.
It's time for a new signature.
|
|
|
|
|
Richard MacCutchan wrote: No it merely calculates the size of the operand and puts the resulting value in the object code. There is no associated library call because sizeof() is an operator, just like +.
And yet other operators like + and == are fully accessible within the Immediate window. You said it yourself... there is no associated library because sizeof is an operator. How can any operator -- an integral part of the language -- ever be out of scope? I mean, wouldn't it strike you as really messed up if suddenly you got an error message saying + was "out of scope"?
If 'sizeof' is only evaluated at compile time and treated as a constant in the executable, and Immediate cannot access it as part of the available evaluation syntax, then it seems to me 'sizeof' would be better termed as a MACRO than an operator -- just like using the #define precompiler directive.
|
|
|
|
|
Well, you are right in all you say and I am (partly) wrong. My biggest mistake was to take your query at face value, rather than checking what results I get. I have just tested this by adding sizeof(variable) in my watch window while debugging and it shows the correct value. So, we go back to the original problem that you are seeing: where exactly, and under what conditions, are you typing your query?
It's time for a new signature.
|
|
|
|
|
The actual query I'm using is what I originally listed:
? sizeof(bool)
rather than
? sizeof(boolean_variable)
To reproduce what I'm getting:
1. Make a new project: C++, CLR, Windows Forms Application
2. Double-click the form to generate the Form_Load event.
3. Put a break point on the closing brace of the Form_Load event handler method.
4. Run the application.
5. When the break point is hit, bring up the Immediate window and type "? sizeof(bool)" (without the quotes, of course)
6. Result is: "error: identifier 'sizeof' is out of scope"
If you take identical steps but use a C# project, you will get an output of "1". Michel had mentioned that we should expect the error message in unmanaged C++, but from the steps I've outlined above, we're not dealing with unmanaged C++. We're dealing with CLR-aware C++, so it seems to me we should have the same .NET support as C#.
BTW, this is under VS 2008 (and Windows 7 64-bit if that makes a difference).
|
|
|
|
|
OK, I can reproduce this under VS2010 (full and Express versions). I guess the only way forward is to raise this with Microsoft. I'm still confused as to why this happens with managed but not unmanaged code; I guess two different debuggers.
It's time for a new signature.
|
|
|
|
|
Hi all, could any one help me out of this
I just want to include a logo.jpg file in my .exe file. I have tried using Image Class (System.Drawing) in Visual C++, but after opening the .exe, and when tried to print, an error is popping up indicating the logo.jpg is missing, it is successful only after including the logo.jpg in the folder.
private: System::Void printDocument_PrintPage(System::Object^ sender, System::Drawing::Printing::PrintPageEventArgs^ e)<br />
{<br />
Image^ newImage = Image::FromFile( "logo.jpg" );<br />
e->Graphics->DrawImage( newImage, 605, 70, 150, 100 );<br />
}
I want to know, is there any other method of including the logo to my print page, which doesn't need a logo.jpg file to be included in the respective folder
Any help is appreciated...Thanks
|
|
|
|
|
this is msdn link[^] what are you looknig for, you can also google for "visual studio resource resx"
...if you are using "visual c++" or "visual c#" this is made so easy by using the designer
|
|
|
|
|
Hi, I'm not very experienced with managed C++(.Net 1.1). So I am having a possibly simple problem with memory management. Below is the code for my question:
<code>
SomeFunction()
{
unsigned char temp __gc[] = new unsigned char __gc[count];
myObject->setArray(temp);
}
void setArray(ByteArrayType arr)
{
this->byteArray = arr;
}
</code>
The problem is, memory consumption increases at the above specified point, and it never decreases, causing an outofmemory exception later. I don't understand. Isn't "temp" supposed to be garbage collected? it is not referenced elsewhere. I have to use arrays for implementation.
Thanks in advance
|
|
|
|
|
|
what the "ListView_DeleteColumn" function do? it's not a .net function...so write the code here if you want an answer
|
|
|
|
|
This is driving me up the wall so I hope someone can help
I have an existing Native C++ DLL created in visual studio 2008.
I want to use some of the class's and the functionality that they provide from within a C++/CLI project (wrapper DLL) which in turn can be used from other .NET applications so in affect I will have a .NET application which references a C++/CLI dll which in turn references a native C++ dll
I can create each of the components as separate protects within a single VS2008 solution file and everything builds without error.
The .NET application runs without error and is able to instantiate the C++/CLI object that I have without error. The problem occurs when I call a method on the C++/CLI object which in turn instantiates a native class. I can debug the code right to the point where:
NativeObject no = new NativeObject();
is called at which point I get a 'System.Runtime.InteropServices.SEHException' occurred in .dll'
The native code works fine used within other native projects the problems only occur in this .NET environment.
For reference I'm exporting class definitions from the native DLL using this at the top of the .h file
#ifdef EXPORT_IMS_CORE_CLASS
#define IMS_CORE_CLASS_API __declspec( dllexport )
#else
#define IMS_CORE_CLASS_API __declspec( dllimport )
#pragma message( "Automatic link to IMSCore.lib (IMS::DataTypes::DataObject)" )
#pragma comment( lib, "IMSCore.lib" )
#endif
I can supply a cut down solution where the error occurs if any one wants to have a look
Thanks in advance for any help, Simon
modified on Wednesday, May 5, 2010 9:17 AM
|
|
|
|
|
I would check my trust model. You will need full trust to do this.
|
|
|
|
|
Hi
The trust settings appear to be ok
I can supply a cut down solution where the error occurs if you want to have a look
|
|
|
|
|
Please don't post the same questions here AND in QA
|
|
|
|
|
hi
i want to run an dshow an application in my project and limit it to my MDI form !
can i do it? if yes how can i?
|
|
|
|