Solved

cant compile : undefined reference to _apicall01

Posted on 2002-07-24
3
178 Views
Last Modified: 2010-04-15
Hi,

New to C (from delphi) installed lcc-win32. Build "hello world" works fine. Got a .c file that i know works for someone else that calls an api. I have all the .h files and everything is the same as my friend but it wont compile saying : undefined reference to (the api call)

Anyone know why please

Many thanks
Smurff
0
Comment
Question by:smurff
  • 2
3 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 7174172
Wrong forum, but no matter. There may not be the correct reference (in the form of #include) in the .c file to the .h file. Can you either check this, or post the line containing the reference here?

(Incidentally - where are the two files? In same diectory?)
0
 
LVL 3

Author Comment

by:smurff
ID: 7174361
Hi

Sorry about the wrong forum, which one should I goto?

The #include section looks like this:



                            /* System include files */
#include    <stdio.h>
#include    <stdlib.h>
#include    <string.h>
                            /* AR System include files */
#include    <ar.h>
#include    <arextern.h>
#include    <arstruct.h>
#include    <arfree.h>


Are they supposed to be case sensative?
The files are in the /include dir Ive tried putting them into the same directory... do you think it could be lcc-win32?

Many thanks
Smurff
0
 
LVL 27

Accepted Solution

by:
BigRat earned 50 total points
ID: 7174424
According to this all the ar.* files should be in the same directory as the system includes (not a good idea). One normally writes :-

#include "ar.h"

and then they are in the application's include directory, whose name is often given as a -I parameter on the compiler's command line.

PS: programmingLanguages/C
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now