C++ is just C with mungified names and structures with pointers. You can call C functions from C++. You compile the "C" stuff as "C" and the "C++" stuff as "C++". You then link them together to produce as executable.
In order to generate a "load module" output (ya know, that EXE thing that you run), you need to have something with a program called "main" (for narrow console applications) "wmain" (for wide console applications), or "WinMain" (for that oh so gooey feeling). SQLite3.c/h do not contain any of these things as they are LIBRARIES OF CODE (aka functions) that YOUR APPLICATION calls, not the application itself. shell.c is an "application" that contains a "main" that can be called from the runtime initializer thus outputting an runnable application (an EXE file). --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of zydeholic >Sent: Friday, 21 December, 2018 16:47 >To: SQLite mailing list >Subject: Re: [sqlite] Need setup code for VC++ 2017 that will >ACTUALLY COMPILE > >Ok, to further define my goals, I am not looking to compile the files >into a final EXE, unless that is the only way I can use it with my >program. I want to tap into the sqlite functionality from a C++ >application I am writing. > >I suppose I need to use the DLL that I downloaded, but have never >used an external library before, not where I had to tell the compiler >how to talk to it. >So, SQLite, backend database. I will do the front end stuff in my >code. Hopefully this clarifies something. > > > From: Larry Brasfield <brasfield.la...@gmail.com> > To: "sqlite-users@mailinglists.sqlite.org" <sqlite- >us...@mailinglists.sqlite.org> > Sent: Friday, December 21, 2018 1:02 PM > Subject: Re: [sqlite] Need setup code for VC++ 2017 that will >ACTUALLY COMPILE > >Zydeholic wrote: >➢ I compile and get one error: >Severity Code Description Project File Line Suppres >sion State Error LNK2001 unresolved external symbol >_sqlite3_version sqlite_try_3 C:\Users\DSNoS\source\repos\sqlit >e_try_3\sqlite_try_3\sqlite3.obj 1 > >That symbol is declared, and a definition for the object so named is >coded, in the sqlite3.c amalgamation without the possibility of >omission by the preprocessor. So I find it exceedingly strange that >your link operation is complaining of an unresolvable reference to >that symbol in sqlite3.obj. For a C compilation, which you certainly >should be using for that C source, the name should be undecorated, >except for the leading underscore, just as it appears in the above- >quoted error message. This leads me to believe you are doing >something too strange for anybody to guess with the information >provided so far. > >You may notice that this thread is misnamed for this latest >difficulty, since the code does actually compile. If I had to name >it accurately, it would be called: [off topic] Need build >instructions for my project which uses SQLite in a development >environment differing from the one actually supported by the SQLite >team. > >Some questions to ask yourself as you attempt to sort this out: >1. Am I compiling the .c sources as C language? >2. Have I modified the sources everybody assumes are as released by >the SQLite team? >3. What does insight does dumpbin.exe, (the VC command line tool for >showing compiled image content), provide into my link errors? >4. How does my sqlite3.obj differ from the one I get following step >19 at https://www.sqlite.org/cli.html , and why? >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users