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

Symbol Referencing Errors

ilikesuresh
Hi
I have written the following program
But when i compile
i got
Undefined first referenced
symbol in file
wmove screen.o
initscr32 screen.o
endwin screen.o
printw screen.o
stdscr screen.o
wrefresh screen.o
ld: fatal: Symbol referencing errors. No output written to a.out


The program code is -->

Expand|Select|Wrap|Line Numbers
  1. #include<stdio.h>
  2. #include<unistd.h>
  3. #include<curses.h>
  4. int main()
  5. {
  6.   initscr();
  7.   move(5,15);
  8.   printw("%s","Hello World\n");
  9.   refresh();
  10.   sleep(2);
  11.   endwin();
  12.   exit(0);
  13.   }
  14.  
Please any one tell me the way to solve this issue..
Thanks
Oct 11 '07 #1
3 3215
weaknessforcats
9,208 Expert Mod 8TB
You have failed to include a library or some source files in your build.

Where are these missing functions located?? For example, printw(). Where is the code for it?
Oct 11 '07 #2
You have failed to include a library or some source files in your build.

Where are these missing functions located?? For example, printw(). Where is the code for it?
But this printw is system defined function,Right?
If it is the case why we need to include the code ?
Oct 11 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
But this printw is system defined function,Right?
If it is the case why we need to include the code ?
You need to include the code or there is no function to call. In the case of system defined functions, all that means is that there is a library provided by the compiler manufacturer with the code for the system defined functions aleady compiled.

The documentation that comnes with your compiler should tell you which header ot include inyour code and the name of the library to add to trhe makefile for the linker.

You need to tell the linker that the code may be in a library by adding the library name as an additional dependency in your makefile.
Oct 11 '07 #4

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

Similar topics

1
by: Alexander Landgraf | last post by:
Hi group, I am not sure if this is the correct place for my question. If not, please tell me. I tried to compile Python 2.3.4 under AT&T MP RAS SVR4: $./configure --prefix=${HOME}...
1
by: student | last post by:
while compiling on: SunOS 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-280R I get the following error: Undefined first referenced symbol ...
1
by: Sharron | last post by:
This problem has me completely stumped...everyone on the net seems to have this problem but I don't understand what they are talking about. I know my code is correct it compiles fine but when I try...
0
by: Sharron | last post by:
Hello, This problem has me completely stumped...everyone on the net seems to have this problem but I don't understand what they are talking about. I know my code is correct it compiles fine but...
2
by: fredy | last post by:
While porting code from SUN 4.2 compiler to SUN 6.2 ( forte) compiler using compatiblity (compat) mode, the following error occurs. If any one knows solution for this problem please let me know....
2
by: Will hunting | last post by:
hi, when compiling using makefile on unix, I encounter such problem, anyone has similar experience on this? what could be the possible cause? thanks make OBJS=out/release "EXTRAFLAGS=-O...
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
3
by: Vijay Bajwa | last post by:
I declared a static std::map<string, intin one.cpp at the module level. This is only used inside the file and I did it to avoid global namespace pollution The file one.o goes into the library...
4
by: Tex08 | last post by:
I did it again... after trashing the old code and trying to start simple, I receive the following error at compile (with g++, required)" g++ main.cc Undefined first...
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:
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
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...
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,...
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
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
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...
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,...

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.