473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 4887
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.