472,364 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Compilation Error/Warning - Help

Hello everybody,

I am not yet fully comfortable with understanding c++ warnings/error
messages. Very recently I have updated my IDE to VC++7.0 (MS.Net
7.0-Enterprise architect) from vc++6. Initially the same code used to
compile without any messages. Now the following warning/error messages
are appearing.

I don't think this it is related some source code of mine. Otherwise I
would have pasted the my code here.

Feel like it some kind of configuration tweak is necessary to my
Makefile. The same messages are appearing for all my *.cpp files.
Can you give me a hint on why these are appearing? and how to resolve
it.

regards,
Raja Koduru
---------------------->message chunk<-----------------------
cl -c -nologo -Zm200 -EHsc -W3 -w34100 -w34189 -MDd -Zi -Gm -GX -GX -GR
-DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -I"."
-I"..\..\..\Libraries\_BuildSystem_\
Include" -I"..\..\LibQtSkin\Include" -I"ui" -I"src"
-I"g:\projects\rediff\TMixerLib\src" -I"G:\Qt\3.3.4\include"
-I"ui\include" -I"." -I"moc" -I"G:\Qt\3.3.4\mkspecs\win32-msvc.net"
-Foobj\ @e:\temp\nm23.tmp RASWizard.cpp
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xlocale(609) : wa
rning C4100: '_Lobj' : unreferenced formal parameter
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xlocale(6
10) : while compiling class-template member function 'void
std::codecvt<_Elem,_B
yte,_Statype>::_Init(const std::_Locinfo &)'
with
[
_Elem=char,
_Byte=char,
_Statype=mbstate_t
]
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xlocale(1
560) : see reference to class template instantiation
'std::codecvt<_Elem,_Byte,_
Statype>' being compiled
with
[
_Elem=char,
_Byte=char,
_Statype=mbstate_t
]
---------------------->message chunk<-----------------------

Jul 23 '05 #1
6 4834
Raja Koduru wrote:
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xlocale(609) : wa
rning C4100: '_Lobj' : unreferenced formal parameter
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xlocale(6
10)


If you look in the vicinity of line 610 in the header <xlocale> you'll
see this:

void _Init(const _Locinfo& _Lobj)
{ // initialize from _Lobj
}

So the compiler is, in fact, correct that _Lobj is not used. If that
bothers you, edit the header and remove _Lobj. Or just turn off this
warning.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 23 '05 #2
Pete Becker,

You are correct. Thank you. I now understand why it is reporting so. I
very much want to disable such errors from standard headers. But I
don't want to edit those standard headers. I would prefer to stitch
configurations at my end.

Please suggest me on how to disable only this particular warning, very
specific to this file(s). I don't want to disable the whole of C4100.
Because if I am making any such mistakes in my code this(C4100) warning
will give me a chance to correct it.

Correct me if my request sounds absurd.

regards,
raja koduru

Jul 23 '05 #3
Raja Koduru wrote:

You are correct. Thank you. I now understand why it is reporting so. I
very much want to disable such errors from standard headers. But I
don't want to edit those standard headers. I would prefer to stitch
configurations at my end.

Please suggest me on how to disable only this particular warning, very
specific to this file(s). I don't want to disable the whole of C4100.
Because if I am making any such mistakes in my code this(C4100) warning
will give me a chance to correct it.

Correct me if my request sounds absurd.


It's not absurd, just, in my view, a bit misguided. You've hit on one of
my pet peeves, so don't take any of this paragraph personally. <g>
There's nothing wrong with a function not using some of its arguments.
It's sometimes necessary, in order to provide a rich interface that
doesn't happen to be needed in a particular class, but is needed in, for
example, derived classes. Busybody compilers can usually be quieted by
leaving out the argument name, but that's not legal in C, so it's not a
general solution. Unfortunately, there's a growing trend to let
compilers dictate style rules in the form of warnings for whatever
valid, unambiguous constructs the compiler writer thinks might be misused.

As to suppressing it for that header, you're asking a compiler-specific
question, which is technically out of bounds in this newsgroup. But
generally speaking you can disable some warnings before including a
header and re-enable them afterwards, and sometimes that disabled status
will stick to the things that were defined in the header.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 23 '05 #4
Thank you Pete Becker. That gives me direction to pursue further.

Jul 23 '05 #5
On 16 Feb 2005 07:53:16 -0800, Raja Koduru
<ks*****@gmail.com> wrote:
You are correct. Thank you. I now understand why it is reporting so. I
very much want to disable such errors from standard headers. But I
don't want to edit those standard headers. I would prefer to stitch
configurations at my end.
Microsoft's headers are full of warnings, and most of them seem to be
not possible to disable without disabling warnings altogether.
Please suggest me on how to disable only this particular warning, very
specific to this file(s). I don't want to disable the whole of C4100.
Because if I am making any such mistakes in my code this(C4100) warning
will give me a chance to correct it.
Exactly. Does that version of the compiler have a #pragma which can be
used to turn off warnings only around the headers in your code?
Correct me if my request sounds absurd.


It's not absurd. Microsoft (or anyone else) releasing standard headers
which produce warnings is absurd...

Chris C
Jul 23 '05 #6
Thanks chris. I using pragma warning disable feature on file by file
basis.

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ced | last post by:
Hi, i'm not an expert in C but i try to compile BTNG software under linux kernel 2.4.2-2. I get these errors at the very first stage. Does someone could have a rapid look on this and tell me...
3
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition...
17
by: abdur_rab7 | last post by:
Hi, I am compiling code for nanosleep in CYGWIN. During compilation i get the following error Socket.cc: In method `bool Socket::hangOnConnection(int = 0)': Socket.cc:338: aggregate `struct...
6
by: alban | last post by:
Hello I have got some problems of compilation on a AIX IBM, I use the XLC compilator (And I can't install another one). I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation...
6
by: subramanian | last post by:
Consider the following program: #include <stdio.h> void myfn(const int **a) { static int i, j, k; a = &i; a = &j;
1
by: hamardk | last post by:
Hi, I'm trying to compile log4cpp-0.3.5rc3 on : SunOS belaurora 5.9 Generic_118558-11 sun4u sparc SUNW,Ultra-4 I'm having compilation issues which are: In file included from...
7
by: antoine | last post by:
Hi all! I'm a French student currently doing an internship in Beijing. I have to simulate a mips machine running with the micro kernel l4. When i compile the kernel i got some compilation errors. I...
9
by: subramanian100in | last post by:
Consider the following program: #include <iostream> #include <string> #include <vector> using namespace std; template<class Tclass Vec : public vector<T> {
3
by: Richard Weeks | last post by:
My question, stated as simply as possible, is: must a constraint violation, as defined by the standard, cause compilation to halt? I believe that in the presence of a constraint violation, at...
4
by: | last post by:
Hi, After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following warning in a VS2005 build: error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect' is obsolete:...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.