473,386 Members | 1,819 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,386 software developers and data experts.

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:249: cannot convert `short unsigned int*' to
`SLsmg_Char_Type*'
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_dchs));

unsigned short linebuf[sizeof(slang_dchs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Type *, 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 1690
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:249: cannot convert `short unsigned int*' to
`SLsmg_Char_Type*'
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_dchs));

unsigned short linebuf[sizeof(slang_dchs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Type *, 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:249: cannot convert `short unsigned int*' to
`SLsmg_Char_Type*'
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_dchs));

unsigned short linebuf[sizeof(slang_dchs)];

extern unsigned int SLsmg_read_raw (SLsmg_Char_Type *, 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_Type' 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. Indiscriminately 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.learn.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
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 )...
10
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...
2
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 -...
6
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...
4
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...
4
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...
9
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...
4
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:...
5
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...
7
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.