Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » "-I" missing from command line for compilation(Unexpected missing "-I" on gcc command line for compilation)
"-I" missing from command line for compilation [message #1770930] Fri, 18 August 2017 21:15 Go to next message
Patrick Ireland is currently offline Patrick IrelandFriend
Messages: 5
Registered: August 2017
Junior Member
I am attempting to reference an include directory in another project.
Eclipse directory description:
- Sqlite (project 1 - builds with no problems)
- Archives (location of .a file)
- Includes (note capital I)
- ARM Crosscompile include directories (created automatically)
- Sqlite/includes (empty, I did NOT create this folder)
- Debug
- includes (I created this folder)
- sqlite3.h
- sqlite3ext.h
- src
- shell.c
- sqlite3.c
- TestSQLiteDBCreate (project 2 - fails to build)
- Archives (I did not create this folder)
- libSqiite.a
- Includes (note capital I)
- ARM Crosscompile include directories (created automatically)
- Sqlite/includes (empty, I did NOT create this folder)
- Debug
- libSqiite.a
- src
- TestSQLiteDBCreate.cpp

In project 2:
Properties->C/C++ Build->Settings->Cross GCC Compiler->Includes
I added to the include paths(-I) using workspace navigation button

"$(workspace_loc:/Sqlite/includes)"

By The Way I also add
Properties->C/C++ Build->Settings->Cross G++ Linker->Librarys
Libraries (-l) I added

"$(workspace_loc:Sqlite/Debug/libSqlite.a)"

File TestSQLiteDBCreate.cpp
has include reference:

#include <sqlite3.h>

the compilation string is :
arm-linux-gnueabihf-g++ [various command line options - but NO -I referencing for any include directory in project SQLite)

I understand why I get "No such file or directory" on the build of project 2. It is because the "-I" reference to the other project is not specified on the command line of the compilation. What I do not understand is why the specification that I provided in the project settings of the second project did not work. I know the the "-I" reference must be on the command line but why is it not.

As an additional question, am I properly setup for referencing "sqlite.a" with the linking phase?

TIA,
Pat


Re: "-I" missing from command line for compilation [message #1770941 is a reply to message #1770930] Sat, 19 August 2017 06:38 Go to previous message
Patrick Ireland is currently offline Patrick IrelandFriend
Messages: 5
Registered: August 2017
Junior Member
Solved the problem.

Because the TestSQLiteDBCreate was a c++ project, the -I must be set for Project->TestSQLLiteDBCreate->Properties->Cross G++ Compiler->includes
Previous Topic:Java 1.6 in Eclipse Luna 4.4.1
Next Topic:Closing many windows in Eclipse
Goto Forum:
  


Current Time: Thu Apr 25 00:29:28 GMT 2024

Powered by FUDForum. Page generated in 0.08703 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top