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

Problem using zlib with Borland's C++ Builder

3
Hello,

First of all I'm a relatively inexperienced C++ programmer so this may seem a simple question to answer.

I'm trying to use zlib from www.zlib.net to decompress some data. However I run into an error when I try to compile the program :

E2015 Ambiguity between 'Byte' and 'System::Byte'

And the offending code (within zconf.h) is :

Expand|Select|Wrap|Line Numbers
  1. #ifdef SMALL_MEDIUM
  2.    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  3. #  define Bytef Byte
  4. #else
  5.    typedef Byte Bytef;
  6. #endif
I've simply included the relavant header files from zlib in my own C++ files and attempted to build, however I suspect this is wrong because zlib source code is written in C.

Can anyone tell me what I must do to get the zlib C code to work in Borland's C++ builder 6 ?

Many thanks

Zed
Dec 20 '07 #1
4 7518
oler1s
671 Expert 512MB
Wait a minute, did you even compile the library first?

EDIT: And it should say:

Expand|Select|Wrap|Line Numbers
  1. #ifdef SMALL_MEDIUM
  2.    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  3. #  define Bytef Byte FAR
  4. #else
  5.    typedef Byte  FAR Bytef;
  6. #endif
  7.  
Dec 21 '07 #2
ZedLep
3
Wait a minute, did you even compile the library first?

EDIT: And it should say:

Expand|Select|Wrap|Line Numbers
  1. #ifdef SMALL_MEDIUM
  2.    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  3. #  define Bytef Byte FAR
  4. #else
  5.    typedef Byte  FAR Bytef;
  6. #endif
  7.  
Well I knew I'd done something daft. I'm so used to to just clicking things on menus to build a project. Thanks for your comment.
Dec 21 '07 #3
ZedLep
3
Unfortunately after blundering round in the dark I've no idea how I build the zlib library and then how to include it in my project. Unfortunately not being an expert in this area, the 'instructions' that come with zlib are as clear as mud to me.

Once I've downloaded zlib123.zip what is my next step ? Am I supposed to build a library from the source, and if so can anyone give me some pointers how I go about this. I am using Borland's C++ builder 6.

Sorry if this is a daft question but I cannot make head-nor-tail of all the make files etc. It seems to me that it's aimed at UNIX installations rather than win32 so I cannot simply follow the 'instructions' given with zlib.

Many thanks

Zed
Dec 21 '07 #4
wlads
1
Try put this conditional defines:
ZLIB_DLL;ZLIB_WINAPI;Z_PREFIX

on your BPR file.

Best regards,

wlad.
Oct 8 '18 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: René Kjellerup | last post by:
Hi' all I've come across a strange thing using 'Borland C++Builder 6 Ent' and are now looking for how this all fit together. Here is the files that where created without the .bpf, .bpr, and...
3
by: shuusaku | last post by:
Dear all, I'm not sure this is the right place to ask for help, but I cannot find any solution anywhere else, I hope you could help me. I'm using Borland C++ Builder 6 with TeeChart v4.04...
4
by: Ramon F Herrera | last post by:
As many of you know, the Borland C++ Builder X IDE allows you to select from a wide variety of compilers for Windows, Linux and Solaris. So far, I have only used it under Windows, where I have 4...
0
by: Xproblem | last post by:
FTP Client Engine for C/C++ 2.4 Screenshot - Soft.comFTP Client Engine for C/C++ 2.4. ... System Requirements: Windows C/C++ compiler - Microsoft operating system: Windows 95, Windows 98, Windows...
22
by: smartwolf agassi via DotNetMonster.com | last post by:
I'm a C# language learner. I want to know which IDE is better for C# programing, Borland C#Builder or VS.net 2003? -- Message posted via http://www.dotnetmonster.com
1
by: Terry | last post by:
Is there any hope of using Borland Developer Studio 2006 to link in a DLL compiled by MS Visual C++ version 6? I have a Win32 DLL from a company named Vocera. The DLL defines C++ classes that I...
1
by: GeeBee | last post by:
1) I’m using Borland C++ Builder 1.0 (a very old (but still good) version). 2) I have an application EXE calling a DLL. 3) A function in the DLL receives a parameter defined as "ostream &" , and...
0
by: CRSiva | last post by:
Hello everybody. I’m a beginner of Borland C++ Builder and also my English is not very good but I hope you understand what my problem is. I have an application in English language and I want to...
0
by: =?Utf-8?B?QWxleEU=?= | last post by:
We are using .NET (C#) and we added several COM dlls as Resources to our projects. These COM dll's were created using Borland C++ Builder 6. When we add any COMs built with Borland into our .NET...
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
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:
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
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...

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.