[comp.os.msdos.apps] Warnings in MS QuickC

msmith@att3b2.tricity.wsu.edu (Mark Smith) (05/14/91)

I've just lately started using MS QuickC.  My problem (annoyance) is that
when I compile a program it will give me the warning about not haveing
function prototypes for my homebrew functions when I already do!! But!!,
when I recompile without changeing anything, nada, zip (get the picture)
it goes just fine, I'm also using warning level 3 (/W3).  I'd use 4
but it gripes about my K&R function defns.  

Any Ideas?  Is it just a bug or a minor quirk?

msmith@att3b2.tricity.wsu.edu

kai@kaiki.toppoint.de (Kai Voelcker) (05/19/91)

msmith@att3b2.tricity.wsu.edu (Mark Smith) writes:

> I've just lately started using MS QuickC.  My problem (annoyance) is that
> when I compile a program it will give me the warning about not haveing
> function prototypes for my homebrew functions when I already do!! But!!,
> when I recompile without changeing anything, nada, zip (get the picture)
> it goes just fine, I'm also using warning level 3 (/W3).  I'd use 4
> but it gripes about my K&R function defns.  

I also have these problems with QC & QAsm 2.5. In QAsm there is a nice effect
I have a correct program to build. It is then compiled and linked. But instead
of runnig it there is an error: unvalid exe file format. After resetting the
compiling & linking options to the SAME as before, it works. What's that??
 ________________________________________________________________________
 | Kai Voelcker, Kappelner Str 18, D-2300 Kiel 1, voice: +49 431 335605 |
 | kai@kaiki.toppoint.de    interests: 386asm, c, pascal; OR algorithms |
 |   >>>  polite notice: I have to pay for incoming mail. Thanks  <<<   |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pabres13@pc.usl.edu (Joubert John V.) (05/22/91)

In article <ZBw621w164w@kaiki.toppoint.de> kai@kaiki.toppoint.de (Kai Voelcker) writes:
>msmith@att3b2.tricity.wsu.edu (Mark Smith) writes:
>
>> I've just lately started using MS QuickC.  My problem (annoyance) is that
>> when I compile a program it will give me the warning about not haveing
>> function prototypes for my homebrew functions when I already do!! But!!,
>> when I recompile without changeing anything, nada, zip (get the picture)
>> it goes just fine, I'm also using warning level 3 (/W3).  I'd use 4
>> but it gripes about my K&R function defns.  
>
>I also have these problems with QC & QAsm 2.5. In QAsm there is a nice effect
>I have a correct program to build. It is then compiled and linked. But instead
>of runnig it there is an error: unvalid exe file format. After resetting the
>compiling & linking options to the SAME as before, it works. What's that??


	I use both of the above named products and have pretty much isolated
the problem to being with the Incremental linker.  If I turn off the 
incremental linker check box from the Options Make Linker command, the 
problem seems to go away.  
	
	I have noticed that if a makefile (*.mak) is there for the Quick
environment, then I can use the Rebuild All function from the Make command.
This takes care of the above named error, as well as errors in which the 
linker suddenly claims that the function does not exist.

	Another nasty little (somewhat related) bug follows:

* Suppose that you have a function from the MS Libraries that you are using,
  which is erroneously typed in without the leading underscore.  Also, this
  is not the first time that this function is called in the .c file.
  For example,

  _settextposition(2,10);     /* First Occurence */
  .
  .
  .
  _settextposition(4,10);    /* Second Occurence */
  .
  .
  .
  settextposition(6,10);     /* Third Occurrence, this one with error */


* When you compile this code, you will get an error, something like:

  _settextposition()  function not found  .. Line XXX

  This error will be pointing to the First Occurence line marked above, where
  the function is properly called.  The error should be pointing to the line
  where the leading underscore has been left off of the function call, that is,
  the Third Occurence.  It seems that linker knows the difference for
  generating the code, but in the error reporting phase, it suddenly cannot
  tell the difference between _settextposition and __settextposition from the
  symbol table.  Keep in mind that most (all?) compilers attach a leading 
  underscore to function names (variables too?) in the symbol table, therefore
  settextposition() becomes _settextposition, and _settextposition becomes
  __settextposition.

  	So, if you get errors on MS Libraries calls that start with a leading
  underscore, don't kill yourself for an hour or so wondering why your linker
  has gone off to la la land, look for a missing leading underscore on one of
  your function calls.

  Gee, this was fun!


-- 
John Joubert                                      |  /\  |    /\    |     _ 
Internet: pabres13@pc.usl.edu                     |  \|<>|>|> \|<>|>|><`|`|
GENIE: J.JOUBERT                                  |--/|-------/|------------
                                                  |  \/       \/