473,811 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compile error message

I am having a problem. I am attempting to compile the fte text editor
(fte-20020324-common.zip and fte-20020324-src.zip on Redhat linux 8.0.
Among
the error messages I get is the following:
---------------------------------------------------------------
con_slang.cpp: In function `int ConInit(int, int)':
con_slang.cpp:2 49: cannot convert `short unsigned int*' to
`SLsmg_Char_Typ e*'
for argument `1' to `unsigned int SLsmg_read_raw( SLsmg_Char_Type *,
unsigned
int)'
---------------------------------------------------------------

The various definitions and usages:

SLsmg_read_raw( linebuf, sizeof(slang_dc hs));

unsigned short linebuf[sizeof(slang_dc hs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Typ e *, unsigned int);

typedef unsigned short SLsmg_Char_Type ;

I cannot for the life of me figure out the error message. Could someone
please
point me in some directions? There are some other messages of the same
type,
but if I can get some help on the above, it might enable me to resolve the
others. Thank you
Nov 14 '05 #1
2 1707
Mac
On Fri, 29 Oct 2004 16:55:34 -0700, David Smith wrote:
I am having a problem. I am attempting to compile the fte text editor
(fte-20020324-common.zip and fte-20020324-src.zip on Redhat linux 8.0.
Among
the error messages I get is the following:
---------------------------------------------------------------
con_slang.cpp: In function `int ConInit(int, int)':
con_slang.cpp:2 49: cannot convert `short unsigned int*' to
`SLsmg_Char_Typ e*'
for argument `1' to `unsigned int SLsmg_read_raw( SLsmg_Char_Type *,
unsigned
int)'
---------------------------------------------------------------

The various definitions and usages:

SLsmg_read_raw( linebuf, sizeof(slang_dc hs));

unsigned short linebuf[sizeof(slang_dc hs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Typ e *, unsigned int);

typedef unsigned short SLsmg_Char_Type ;

I cannot for the life of me figure out the error message. Could someone
please
point me in some directions? There are some other messages of the same
type,
but if I can get some help on the above, it might enable me to resolve the
others. Thank you


It appears that your files are .cpp files. Are they c or c++? The two
languages are different, you know. If the files are c++, they are off
topic in comp.lang.c.

Anyway, the error message is fairly straightforward , without even looking
at your definitions and so on.

The first argument to SLsmg_read_raw( ) is expected by the compiler to be
of type "pointer to SLsmg_Char_Type ".

The ACTUAL type you are trying to pass into the function, on line 249, is
"pointer to unsigned short."

This actually matches your definitions and usage. While the type mismatch
doesn't seem right, I wouldn't think it would necessarily stop the
compiler from producing an executable if it is operating as a c compiler.
But maybe it is operating as a c++ compiler?

Ultimately, this is a build problem that you will have to solve by talking
to the people who maintain the code, or people who are knowledgeable about
your platform (Redhat, I guess).

Don't give up, I'm sure you can straighten it out if you persist.

--Mac

Nov 14 '05 #2
On Fri, 29 Oct 2004 16:55:34 -0700, David Smith <ac***@lafn.org > wrote
in comp.lang.c:
I am having a problem. I am attempting to compile the fte text editor
(fte-20020324-common.zip and fte-20020324-src.zip on Redhat linux 8.0.
Among
the error messages I get is the following:
---------------------------------------------------------------
con_slang.cpp: In function `int ConInit(int, int)':
con_slang.cpp:2 49: cannot convert `short unsigned int*' to
`SLsmg_Char_Typ e*'
for argument `1' to `unsigned int SLsmg_read_raw( SLsmg_Char_Type *,
unsigned
int)'
---------------------------------------------------------------

The various definitions and usages:

SLsmg_read_raw( linebuf, sizeof(slang_dc hs));

unsigned short linebuf[sizeof(slang_dc hs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Typ e *, unsigned int);

typedef unsigned short SLsmg_Char_Type ;

I cannot for the life of me figure out the error message. Could someone
please
point me in some directions? There are some other messages of the same
type,
but if I can get some help on the above, it might enable me to resolve the
others. Thank you


The compiler states that the first argument to the function
SLmsg_read_raw( ) is supposed to be a pointer to a signed short int in
the error message, and I'll have to assume it is correct because you
didn't show us the prototype for the function.

You do show a typedef of 'SLmsg_Char_Typ e' as an alias for unsigned
short int, although using 'Char' in the name of something that isn't a
character type is likely to be considered extremely bad by most C
programmers.

In any case, your function needs a pointer to signed short, and you
are passing is a value of pointer to unsigned short. These are
incompatible types, and the conversion requires a cast. Or changing
either the parameter or typedef type. Indiscriminatel y mixing signed
and unsigned types can cause hard-to-find program defects.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #3

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

Similar topics

5
3824
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace ) Person.xsd includes Common-Naming.xsd ( anonimous schemas ) Common-Naming.xsd includes common.xsd ( both are anonimous schemas ) Compilation of Resident.xsd raise the following exception: "System.Xml.Schema.XmlSchemaException: The attribute 'oid'...
10
19733
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I have a struct that contains several different types of data. This struct is used throuout the program. Now, when I compile, I get 6 errors, all of them "Use of possibly unassigned field 'awayTime'" or "Use of possibly unassigned field 'intlTime'"....
2
3320
by: Gustavo | last post by:
After updating Windows 2000 I began to get a weird compile error message: Deleting intermediate files and output files for project 'pp - Win32 Debug'. --------------------Configuration: pp - Win32 Debug-------- ------------ Compiling... pp.cpp c:\program files\microsoft visual studio\vc98
6
2864
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked fine while the file was in the project directory. When the obsolete file was removed from the project directory, my application will no longer compile. Can someone please help with this issue? Thank in advance, Tom
4
9428
by: Siegfried Heintze | last post by:
It appears that the automatic compilation feature of ASP.NET causes problems with a security package called Black Ice that my hosting service is using. I'm hoping that if I manually compile my web service, I can avoid the randomly named DLLs that ASP.NET creates when I hit my web service after FTPing new C# source code. So I used Visual Studio to create a web service on the remote hosting service and that worked. However, I would like...
4
1995
by: Seok Bee | last post by:
Dear Experts, I've completed my console application and now wants to compile the application and an executable file to be run at another location. However, I've tried compiling that program in the command prompt with the following command : vbc Module1.vb /out:OEAutomation.exe /t:exe I received a lot of error messages.
9
3522
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them has mandatory parameters, I mean, they should not be null nor empty (for strings). So I'd make the validation in the constructor and generate a compile-time error if the validation does not match... Is there a way to achieve this or to specify...
4
1847
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following: C:\PK\Development\Products\UTCAS\4.0\SRC\MeltPracApplication\Dialog\Composit ionForm.cs(942): Argument '1': cannot convert from 'ref MeltPracData.MeltPracDataComposition' to 'ref MeltPracCommon.IDialogPostData'
5
1526
by: Torben Laursen | last post by:
Hi Often I just want to compile one c++ file in a project the check it for errors. Now I can right click on a *.cpp file and select "Compile" But is there a way and short cut to compile a file of any type. luke *.cc, *.h, *hpp Thanks Torben
7
3671
by: news.microsoft.com | last post by:
I have an asp.net 2.0 project that when I change the build configuration to release I get the following error: Command line error BC2014: the value 'None' is invalid for option 'debug'. If I go into the projects Advanced Compile Options and change the Generate Debug Info dropdown from None to PDB-Only the error goes away. Can anyone explain why I have to do this and what can I do to get the one option to work on a asp.net project? ...
0
9605
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
10648
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
10402
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,...
0
9205
agi2029
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...
1
7670
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
5554
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
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
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.