Author Topic: Problem compiling SQLite as Debug-Build  (Read 6169 times)

leonb

  • Guest
Problem compiling SQLite as Debug-Build
« on: August 16, 2010, 06:14:02 pm »
Hi,
I am developing an application with Code:Blocks and MinGW under Windows 7 and need to use SQLite. So I added the c-file from the amalgamation to my project and put the headerfile into the project directory. After I've done that I get hundreds of warnings like this:

{standard input}|137689|Warning: .stabs: description field '10263' too big, try a different debug format

when trying to build a Debug-Build. When building a Release-Build, I also get some warnings but very few and the build is completed without errors.

Has anybody an idea how to eliminate those warnings?

Thanks
Leonard
« Last Edit: August 16, 2010, 06:17:08 pm by leonb »

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: Problem compiling SQLite as Debug-Build
« Reply #1 on: August 16, 2010, 06:33:00 pm »
gcc under Windows cant handle the SQLite3 amalgamation file in debug mode.

However, since you are probably NOT going to debug sqlite3 itself, compile it without -g  and it will work fine.

I am not sure if codeblocks provides an option to set a different build options per file ( I am sure that one of C::B gurus can answer that, or maybe try searching the forum), even if it does not provide compile options per file, you can still workaround it by creating a new project just for the sqlite3.c/h files, remove the -g option from this project (for the Debug target) and create a dependency between the two projects.

If codeblocks does provide build options per file, simply remove the -g flag from sqlite3.c file.

Eran

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Problem compiling SQLite as Debug-Build
« Reply #2 on: August 16, 2010, 08:55:53 pm »
If codeblocks does provide build options per file, simply remove the -g flag from sqlite3.c file.
This is possible, just right-click on the file and modify it's properties concerning build (this will override the "default" as setup per project / target).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline nenin

  • Almost regular
  • **
  • Posts: 212
Re: Problem compiling SQLite as Debug-Build
« Reply #3 on: August 18, 2010, 05:47:11 pm »
If you does not interesting  in debugging SQLite itself, you can create static library from amalgamation and use it. For example, I created  3 sqlite3.a for myself: x686, K8 and p4. If you wants to debug SQLite, you should not use amalgamation.