errors compiling with MS VC++ 6.0

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

errors compiling with MS VC++ 6.0

Robert G. Ristroph

Hi,

    I am building sqlite 3.2.2 on windows with MS VC++ 6.0.  I am doing this
because I believe I need the .lib file to use the .dll with my code.

    Based on this message:

http://www.mail-archive.com/sqlite-users@.../msg04528.html

    I created an emply DLL project and added the .c and .h files as described,
and also the .def file.  I added the .def file under the "Resources" folder
because I wasn't sure where to put it.

    When I then try to build the project, I get internal compiler errors.  Here
are the first few lines of 35 errors it has:

Deleting intermediate files and output files for project 'sqlite - Win32
Debug'.
--------------------Configuration: sqlite - Win32 Debug--------------------
Compiling...
alter.c
attach.c
i:\code\al_win\sqlite\sqlite\attach.c(0) : fatal error C1001: INTERNAL COMPILER
ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more
information
auth.c
i:\code\al_win\sqlite\sqlite\auth.c(0) : fatal error C1001: INTERNAL COMPILER
ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more
information

If anyone has any thoughts about how to do this, I would appreciate it.  If not
I may try to build it with mingw over the weekend.

--Rob

--
Robert G. Ristroph
Airlink Systems
[hidden email]
(512) 231-1240 x103

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Reply | Threaded
Open this post in threaded view
|

Re: errors compiling with MS VC++ 6.0

Randall Fox
>  When I then try to build the project, I get internal compiler errors.
>  Here are the first few lines of 35 errors it has:

I have built v3.08 and v2.x using VC++ 6 and 7.x

You do get a lot of casting warnings (which you can turn off/ignore),
but I never got a compiler error.

I would suspect it is something to do with your setup..  In fact I have
only once seen an INTERNAL COMPILER ERROR when using VC++, and it was my
fault.

Things to check:

Make sure the compiler can find the file.
Try compiling the .c file alone (without other .c files)
The file could be to large for the compiler..  There are settings that
will increase the buffer size..  (I had this problem when I put in a
char array that was just MASSIVE)..  I ended up removing the data from
the executable to fix it..

If the file still gives errors when you compile it alone, try commenting
out some things and see if it gives a different  (more normal) error..

Randall Fox



Reply | Threaded
Open this post in threaded view
|

Re: errors compiling with MS VC++ 6.0

D. Richard Hipp
On Fri, 2005-06-17 at 16:54 -0700, Randall Fox wrote:
> I would suspect it is something to do with your setup..  In fact I have
> only once seen an INTERNAL COMPILER ERROR when using VC++, and it was my
> fault.
>

I don't use VC++.  But I have gotten a few "internal errors" on the
compiler
I do use (GCC) over the years.  In every case, the cause has turned out
to
be a defective memory SIMM.  

Memtest86 is your friend.  http://www.memtest86.com/
--
D. Richard Hipp <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: errors compiling with MS VC++ 6.0

Nuno Lucas
In reply to this post by Randall Fox
[18-06-2005 0:54, Randall Fox escreveu]
>>  When I then try to build the project, I get internal compiler errors.
>>  Here are the first few lines of 35 errors it has:
>
> I have built v3.08 and v2.x using VC++ 6 and 7.x
> You do get a lot of casting warnings (which you can turn off/ignore),
> but I never got a compiler error.

Same with me.

> I would suspect it is something to do with your setup..  In fact I have
> only once seen an INTERNAL COMPILER ERROR when using VC++, and it was my
> fault.

Well, MSVC 6.0 does a lot of this when compiling C++ code with advanced
features (that it doesn't support or support badly).

My tip would be to make sure you're not compiling the code as C++ or
that you use C++ code in other files (by building sqlite as a static C
library and only then linking it to your code).

Regards,
~Nuno Lucas
Reply | Threaded
Open this post in threaded view
|

Re: errors compiling with MS VC++ 6.0

Jay Sprenkle
Msvc 6 can do this if you use some features of c++, you have an early
version, and haven't applied the service packs. You could test for
memory errors using memtest86 or something similar (i believe it's
memtest86.org?).


On 6/18/05, Nuno Lucas <[hidden email]> wrote:

> [18-06-2005 0:54, Randall Fox escreveu]
> >>  When I then try to build the project, I get internal compiler errors.
> >>  Here are the first few lines of 35 errors it has:
> >
> > I have built v3.08 and v2.x using VC++ 6 and 7.x
> > You do get a lot of casting warnings (which you can turn off/ignore),
> > but I never got a compiler error.
>
> Same with me.
>
> > I would suspect it is something to do with your setup..  In fact I have
> > only once seen an INTERNAL COMPILER ERROR when using VC++, and it was my
> > fault.
>
Reply | Threaded
Open this post in threaded view
|

Re: errors compiling with MS VC++ 6.0

Dennis Cote
In reply to this post by Robert G. Ristroph
Robert G. Ristroph wrote:

>    I am building sqlite 3.2.2 on windows with MS VC++ 6.0.  I am doing this
>because I believe I need the .lib file to use the .dll with my code.
>
>
>
Hi Robert,

You don't need to build SQLite in VC++ to generate the .lib file. VC++
includes a utility program called lib that is used to make a suitable
lib file for a dll. All you need to do is feed the sqlite3.def file
included in the SQLite source to this utility and it will generate a lib
file for you. You then add the lib file to your project, and it will
load and use the API functions in sqlite3.dll. A sample lib command line
is given below.

  lib /machine:i386 /def:sqlite3.def

HTH
Dennis Cote