Script problem help

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2005
Posts: 34
Reputation: Mike182 is an unknown quantity at this point 
Solved Threads: 0
Mike182's Avatar
Mike182 Mike182 is offline Offline
Light Poster

Re: Script problem help

 
0
  #11
Feb 27th, 2006
Hmmmmm....that didnt fix it either.. Fatal errors are by far the most annoying to debug >_<"
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script problem help

 
0
  #12
Feb 27th, 2006
like I said before, you wil be spinning your wheels because you are attempting to compile a program that isn't c or c++. you might also make macros out of those funny-looking variable names to redefine then according to c and c++ rules.

  1. #ifndef function

do you have a matching #endif for that???
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 34
Reputation: Mike182 is an unknown quantity at this point 
Solved Threads: 0
Mike182's Avatar
Mike182 Mike182 is offline Offline
Light Poster

Re: Script problem help

 
0
  #13
Feb 27th, 2006
Macros eh? Hmmm, how can I redefine them to C/C++ rules?
Thanks alot for your help so far, I appreciate it.
EDIT:
I didnt have an #endif, but when I placed one in it created 62 errors =\
EDIT 2: The 62 errors came from an #endif in the script file, it still has 1 error if i put the #endif function in.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script problem help

 
0
  #14
Feb 27th, 2006
I just tried it -- macors won't work either because the compiler doesn't like the '@' character. You will have to resort to brute force and manually make all the changes. For example, change $@db_count to db_count. you also will have to declare the data types because c will not let you use a variable before it is defined, line vb will do.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 34
Reputation: Mike182 is an unknown quantity at this point 
Solved Threads: 0
Mike182's Avatar
Mike182 Mike182 is offline Offline
Light Poster

Re: Script problem help

 
0
  #15
Feb 27th, 2006
What do you mean 'line vb will do'?
Ok, Ive removed all the $ and @, and still have the error, what is it I have to define?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script problem help

 
0
  #16
Feb 27th, 2006
<<'line vb will do'

typo -- replace "line" with "like".

You do know how to write c/c++ programs don't you?

I don't think it will be very easy to port that code. What are you trying to do anyway? Why port it at all? there is a huge amount of code examples to follow if you want to access a database in c or c++. There are even some c++ classes on the net.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 34
Reputation: Mike182 is an unknown quantity at this point 
Solved Threads: 0
Mike182's Avatar
Mike182 Mike182 is offline Offline
Light Poster

Re: Script problem help

 
0
  #17
Feb 27th, 2006
Its not really for porting, I just needed to find and fix the errors in it, thats all it was for. The last is proving to be remarkably difficult to solve.. And yes, I do know how to write c/c++ programs, Im just not an elite at it.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script problem help

 
0
  #18
Feb 27th, 2006
  1. set $@array_size, getarraysize(getarg(0));

That is neither a standard C or C++ statement. You will have to find out what language it was written in, then learn what it does. my guess is that it is assigning the return value of function getarraysize() to variable $@array_size
  1. int array_size = getarraysize(getarg(0));

now I have no clue what getarg(0) will return. you will need to find that out too.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 34
Reputation: Mike182 is an unknown quantity at this point 
Solved Threads: 0
Mike182's Avatar
Mike182 Mike182 is offline Offline
Light Poster

Re: Script problem help

 
0
  #19
Feb 27th, 2006
All that stuff like OnInit, db_count and such is all already defined in the RO source code, its C++ but its been defined in another file, the file I posted just has some general debug errors, 2 of which I fixed. I looked up the fatal error C1004 on the msdn homepage, but it doesnt look to be much help.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script problem help

 
0
  #20
Feb 27th, 2006
Originally Posted by Mike182
its C++ .
No it is NOT c++. The code you posed is probably run through another language's preprocessor which translates it into c++ code. You cannot compile that code directly with a c++ compiler. It must be interpreted by anothr preprocessor first.

Many database 4GL programs are like that. The code is similar to c an c++, but isn't.

>>C1004
you can get that error several ways. mismatches braces, brackets #ifdef/#endif are a few. It can be a real bear sometimes to find the error. One of my debugging solutions to find it is to start commenting out large blocks of code until I find the problem.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC