Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-10-2010, 08:00 PM   #1
LQ Newbie
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Why is my only compile error "'Current:' Undeclared"

I have a program with a variable named current, but it is not declared. The syntax is current -> othervariable. Theoreticaly there should be no problem with this program. Just wondering what woudl cause this? Which linux include file is current supposed to be declared in?

Old 01-10-2010, 08:05 PM   #2
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Rep: Reputation: 116Reputation: 116
It may be helpful if

1) You tell us what language it is written in
2) You post the sourcecode
3) You post the command you are using to compile with
Old 01-10-2010, 11:28 PM   #3
LQ Newbie
Registered: May 2009
Location: Bangalore, India
Distribution: Kubuntu 2.6.31-14
Posts: 19

Rep: Reputation: 2
Originally Posted by gh0pp3r View Post
...but it is not declared.
Some languages support using variables without declaring them like BASIC, Python, etc (most of them being interpreted languages rather than compiled languages). However, others like C, C++ requires every variable to be declared before using them.

If you are using gcc then use the option -Wall while compiling. This option will display all the errors.

gcc -Wall -pedantic myFile.c
Post your exact error messages, and part of source code in question for faster feedback from forum members.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg build - "undeclared" errors Jinouchi Linux - Newbie 5 01-23-2009 10:14 AM
Format command shows "Cannot get current directory - I/O error" devn Solaris / OpenSolaris 1 06-18-2008 01:26 AM
LXer: Solve the error: "current dist not found in meta-release" and upgrade to Gutsy LXer Syndicated Linux News 0 09-08-2007 05:00 AM
Problem with X consoles - "shell-init: error retrieving current directory" lowpro2k3 Slackware 4 03-26-2007 06:36 PM
LIRC make error "`HID_MAX_USAGES' undeclared hereĻ jimdaworm Linux - Software 1 09-26-2006 02:16 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration