Solved

cant compile : undefined reference to _apicall01

Posted on 2002-07-24
3
192 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…

831 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