Thread overview
lib'ing *.obj
Jan 12, 2002
Greg Comeau
Synthesized decl too strong
Jan 12, 2002
Greg Comeau
Jan 12, 2002
Walter
Jan 12, 2002
Greg Comeau
Jan 12, 2002
Walter
Jan 12, 2002
Greg Comeau
Jan 12, 2002
Walter
January 12, 2002
How can I specify a wildstar to add a bunch of .obj's into a lib, using lib?

Also, lib has the same name as MS's lib command, therefore creating a conflict.  Are they intended to be compatible?
-- 
Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
January 12, 2002
Given code such as follows:

void foo(); // No prototype, just a declaration

int main()
{
  foo(99); // Expects at least foo(int)
  foo("hi"); // Expects at least foo(char *)

  return 0;
}

sc will diagnoses:
  foo("hi");
          ^
syn.c(6) : Error: need explicit cast for function parameter 1 to get
from: char *
to  : int
--- errorlevel 1

Clearly this is undefined behavior, but in case where say
the arguments were pointers to function of different types
the danger is minimal, especially when done on purpose.
Therefore, I feel the the above is too strong an error message.
Is there an option to control it?
-- 
Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
January 12, 2002
"Greg Comeau" <comeau@panix.com> wrote in message news:a1ppke$q66$1@panix3.panix.com...
> How can I specify a wildstar to add a bunch of .obj's into a lib, using lib?

Can't. Gotta do it one by one!

> Also, lib has the same name as MS's lib command, therefore creating a conflict.  Are they intended to be compatible?

DM LIB is closely compatible with older implementations of MS lib. Microsoft completely changed how theirs worked. Same for the linker.



January 12, 2002
Yes, -p turns off autoprototyping.

"Greg Comeau" <comeau@panix.com> wrote in message news:a1puqu$jaj$1@panix3.panix.com...
> Given code such as follows:
>
> void foo(); // No prototype, just a declaration
>
> int main()
> {
>   foo(99); // Expects at least foo(int)
>   foo("hi"); // Expects at least foo(char *)
>
>   return 0;
> }
>
> sc will diagnoses:
>   foo("hi");
>           ^
> syn.c(6) : Error: need explicit cast for function parameter 1 to get
> from: char *
> to  : int
> --- errorlevel 1
>
> Clearly this is undefined behavior, but in case where say
> the arguments were pointers to function of different types
> the danger is minimal, especially when done on purpose.
> Therefore, I feel the the above is too strong an error message.
> Is there an option to control it?
> --
> Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?


January 12, 2002
In article <a1q1pf$1arq$4@digitaldaemon.com>,
Walter <walter@digitalmars.com> wrote:
>"Greg Comeau" <comeau@panix.com> wrote in message news:a1ppke$q66$1@panix3.panix.com...
>> Also, lib has the same name as MS's lib command, therefore creating a conflict.  Are they intended to be compatible?
>
>DM LIB is closely compatible with older implementations of MS lib. Microsoft completely changed how theirs worked. Same for the linker.

So _must_ one invoke the dm lib.exe and link.exe?
What happens if MS's lib.exe or link.exe is used by mistake
do to PATH orientation?

It seem to work, so what I'm asking probably is, under what circumstances won't it work?    Only with new MS compilers? If so, what versions == new?
-- 
Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
January 12, 2002
In article <a1q1pg$1arq$5@digitaldaemon.com>,
Walter <walter@digitalmars.com> wrote:
>Yes, -p turns off autoprototyping.

Oh, ok, for some reason I though that generate function prototypes to a file, for generated headers from old C code....
-- 
Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
January 12, 2002
Microsoft changed their .obj file format from OMF to COFF. The DM compilers still generate OMF, which Microsoft's tools cannot handle anymore. MS made the switch when they abandoned 16 bit support.

It's necessary to use the DM linker and DM lib with the output of DMC++.

You'll need to adjust PATH so /dm/bin precedes Microsoft's tools bin. It isn't necessary to adjust INCLUDE, etc., because sc.exe will pull it out of \dm\bin\sc.ini.

"Greg Comeau" <comeau@panix.com> wrote in message news:a1q3b4$q0j$1@panix3.panix.com...
> In article <a1q1pf$1arq$4@digitaldaemon.com>,
> Walter <walter@digitalmars.com> wrote:
> >"Greg Comeau" <comeau@panix.com> wrote in message news:a1ppke$q66$1@panix3.panix.com...
> >> Also, lib has the same name as MS's lib command, therefore creating a conflict.  Are they intended to be compatible?
> >
> >DM LIB is closely compatible with older implementations of MS lib.
Microsoft
> >completely changed how theirs worked. Same for the linker.
>
> So _must_ one invoke the dm lib.exe and link.exe?
> What happens if MS's lib.exe or link.exe is used by mistake
> do to PATH orientation?
>
> It seem to work, so what I'm asking probably is, under what circumstances won't it work?    Only with new MS compilers? If so, what versions == new?
> --
> Greg Comeau   What's next: additional Windows backends and 'export'! Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?