473,756 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_SUPP ORT -I"."
-I"..\..\..\Libr aries\_BuildSys tem_\
Include" -I"..\..\LibQtSk in\Include" -I"ui" -I"src"
-I"g:\projects\r ediff\TMixerLib \src" -I"G:\Qt\3.3.4\i nclude"
-I"ui\include " -I"." -I"moc" -I"G:\Qt\3.3.4\m kspecs\win32-msvc.net"
-Foobj\ @e:\temp\nm23.t mp RASWizard.cpp
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\xlocale(609) : wa
rning C4100: '_Lobj' : unreferenced formal parameter
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\xlocale(6
10) : while compiling class-template member function 'void
std::codecvt<_E lem,_B
yte,_Statype>:: _Init(const std::_Locinfo &)'
with
[
_Elem=char,
_Byte=char,
_Statype=mbstat e_t
]
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\xlocale(1
560) : see reference to class template instantiation
'std::codecvt<_ Elem,_Byte,_
Statype>' being compiled
with
[
_Elem=char,
_Byte=char,
_Statype=mbstat e_t
]
---------------------->message chunk<-----------------------

Jul 23 '05 #1
6 4908
Raja Koduru wrote:
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\xlocale(609) : wa
rning C4100: '_Lobj' : unreferenced formal parameter
D:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\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
25534
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 what's wrong regards I get this error:
3
3351
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 from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\1f575646\ad3a161b\assembly\dl2\57ca505e\044565c0_f84fc401\Test1.DLL' The problem is that the control is defined in two different assemblies
17
5122
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 timespec tmsp' has incomplete type and cannot b e initialized
6
9803
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 after the pre-compilation with the my makefile I get the files ".c" After this a get also the objects files ".o", but no linkage ! and I can't have the exec file ! I have got some errors how I dont understand really :
6
2112
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
2978
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 PortabilityImpl.hh:12, from Appender.cpp:10: .../include/log4cpp/Portability.hh:40: syntax error before `('
7
3012
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 solved most of them but here I'm stuck and I hope you could help me. Here is the error message : /home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:233:2: warning: #warning VU: do we have to preserve prios on ex-regs?...
9
1977
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
1815
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 least one diagnostic is required, which, at the discretion of the compiler writer, may be either an "error" or a "warning." Generally however, an error halts compilation and a warning does not. This would seem to imply that it is up to the compiler...
4
2034
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: 'Avoid using BitmapEffects as they have very poor performance characteristics. They will be deprecated in a future version. Consider using the UIElement.Effect property and ShaderEffects where appropriate instead.'
0
9271
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,...
0
10031
Oralloy
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...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
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
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.