LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2005, 06:04 AM   #1
Jaykay3k
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Rep: Reputation: 15
Compile error (#define errors)


Hi,

I have these errors and some one gave me a possible sollution (shown after problem definition in this thread) BUT I am no linux or programming wizz-kid so was wondering if any one who is might be able to help

1) This line : #define TRACECAT(category, level, format, args...)\
debug_trace(category, level, _fire_,_line,format,##args)

causes these errors:
debug.h:35: 'category' was not declared in this scope
35: 'level' was not declared in this scope
debug.h:35: 'format' was not declared in this scope
debug.h:35: parse error before '#'

and

2) This line: #define TRACE(level, format, args...)\
debug_trace(TRACECAT_DEFAULT, level, NULL, -1,format,##args)


causes these errors:
debug.h:37:ANSI C++ forbids declaration 'debug_trace' with no type
debug.h: in function 'int debug_trace(...)'
debug.h:37: 'TRACECAT_DEFAULT' undeclared first use in this function.
debug.h:37: 'level' was not declared in this scope
debug.h:37: 'format' was not declared in this scope
debug.h:48:ANSI C++ forbids declaration 'debug_trace' with no type
debug.h: in function 'int debug_trace(...)'
debug.h:37: 'int debug_trace(...)' previously defined.
debug.h:37: parse error before '#'

I really do appreciate all your help. looking forward to reply and many thanks in advance.

>From: Godfrey Tan <godfreyt@MIT.EDU>
>To: Jay Kay <taqlu23@hotmail.com>
>Subject: Re: ns-2.1b7a compiling error
>Date: Sat, 26 Feb 2005 22:14:18 -0500
>
>The following note from a Blueware user might help:
>Some compilation notes for blueware under gcc 2.95.3 (suse linux
>7.3)
>
>Blueware will compile with ns-2.1b7a and gcc 2.95.3 but a few tweaks
>need to be made. I reckon that this is due to using a
>slightly different version of gcc to the blueware team. Note that
>blueware does not work with gcc >=3.0
>
>For some strange reason in macro definitions the multiline macro of
>the style:
>
>#define macro linel \
>line2 \
>line3 throw compilation errors. Make the macro definitions into one
>long line. Whenever you get
>an 'unterminated macro call' error, go to that line, and add the
>arguement 0 to the function call: e.g
>
>TRACE_BT(LEVEL_TSF, "_%d_ %s HANDLE: ROOTID %d %s %s bTopoInProg
>%d\n");
>
>gets changed to:
>
>TRACE_BT(LEVEL_TSF, "_%d_ %s HANDLE: ROOTID %d %s %s bTopoInProg
>%d\n",0);
>
 
Old 03-03-2005, 11:49 PM   #2
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
Quote:
1) This line : #define TRACECAT(category, level, format, args...)\
debug_trace(category, level, _fire_,_line,format,##args)
I'm no programming wiz either but it appears from the error messages that you've got to
figure out a way around the \ - newline character, this is why the compile is burping?
You may be looking at some stiff library incompatibilities.

nz
 
Old 03-04-2005, 01:28 PM   #3
Jaykay3k
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Original Poster
Rep: Reputation: 15
You were right! so you must be a programmer
But I now have another problem, it is:

Make:*** No rule for target 'Tcl\lib\ns-node.tck' needed by 'gen\ns_tcl.cc'.stop.
NS MAKE FAILED.

I hate this, every time i fix something something else goes wrong!?!
 
Old 03-04-2005, 08:40 PM   #4
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
Okay another WAG. should 'Tcl\lib\ns-node.tck' be 'Tcl\lib\ns-node.tcl'?

nz
 
Old 03-05-2005, 06:05 PM   #5
Jaykay3k
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Original Poster
Rep: Reputation: 15
thx for advice moit. I have fized theons problems posted BUT have tons MORE!
 
  


Reply


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
compile errors. DrunkenDisciple Linux - Software 3 11-29-2005 01:11 AM
c++ compile errors using g++ ttumelty Programming 5 09-08-2005 02:58 PM
compile errors davidleroux1 Programming 4 05-10-2005 11:03 PM
C++ compile errors Palamides Programming 1 03-09-2005 07:28 AM
Compile Errors userini Linux - Software 6 07-16-2003 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 PM.

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