discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUmakefile


From: Justin Lolofie
Subject: Re: GNUmakefile
Date: Tue, 17 Mar 2009 16:10:29 -0500

Ok, so I built PLDatabase as a single library and it seemed to work fine. But when I try to use it in my tool I get the error below. When its reading PLDatabase headers it seems to not know about NSObject. I must be doing something out of order- anyone have any idea?

One other question- PLDatabase is an sqlite wrapper- it occurs to me that neither makefile (library or tool) tells the linker about sqlite- should I have done this in the library makefile or the tool makefile?

################# make output
bwatch$ make
Making all for tool bwatch...
 Compiling file WatchList.m ...
In file included from WatchList.m:2:
/path/include/PLSqliteDatabase.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/path/include/PLSqliteDatabase.h:34: error: cannot find interface declaration for ‘NSObject’, superclass of ‘PLSqliteDatabase’
/path/include/PLSqliteDatabase.h:34: error: cannot find protocol declaration for ‘PLDatabase’
/path/include/PLSqliteDatabase.h:37: error: expected specifier-qualifier-list before ‘NSString’
/path/include/PLSqliteDatabase.h:43: error: expected ‘)’ before ‘NSString’
/path/include/PLSqliteDatabase.h:45: error: expected ‘)’ before ‘NSString’
/path/include/PLSqliteDatabase.h:47: error: expected ‘)’ before ‘BOOL’
/path/include/PLSqliteDatabase.h:48: error: expected ‘)’ before ‘BOOL’
/path/include/PLSqliteDatabase.h:48: error: expected ‘)’ before ‘NSError’
/path/include/PLSqliteDatabase.h:50: error: expected ‘)’ before ‘int64_t’
make[1]: *** [shared_obj/WatchList.o] Error 1
make: *** [bwatch.all.tool.variables] Error 2

################# makefile:

include $(GNUSTEP_MAKEFILES)/common.make

ADDITIONAL_INCLUDE_DIRS = -I/my_stuff/include
ADDITIONAL_LIB_DIRS = -L/my_stuff/GNUstep/Library/Libraries
ADDITIONAL_TOOL_LIBS = -lpldb

TOOL_NAME=bwatch
bwatch_HEADERS=WatchList.h
bwatch_OBJC_FILES=main.m WatchList.m

include $(GNUSTEP_MAKEFILES)/tool.make



On Mon, Mar 16, 2009 at 6:43 AM, Truls Becken <truls.becken@gmail.com> wrote:
Richard Frith-Macdonald wrote:
>
> On 13 Mar 2009, at 14:14, Justin Lolofie wrote:
>
>> So, I've written my first very simple command line tool with objc/gnustep.
>> Below is my GNUmakefile which works fine. Now I'd like to start using
>> plausible database which is an objc sqlite wrapper. It contains 8 .h and 8
>> .m files. I'm trying to figure out what to add to my GNUmakefile to
>> compile/link those files correctly. I see that there is a
>> "ADDITIONAL_INCLUDE_DIRS" which I can use to find the plausible db header
>> files, but I'm not sure how to tell it where the .m file are and how to
>> build them. I dont think they go in bwatch_OBJC_FILES do they? Thanks for
>> any help.
>
> Use bwatch_TOOL_LIBS to add libraries you want to link with ... that's what
> I do to link the SQLClient library (also wraps sqlite along with postgres
> and other database) with my tools.

First, Justin needs to compile pldatabase. This raises the question if
he should build it as a library or a framework. In any event, the
natural approach is to write a GNUmakefile to replace the Xcode
project file that comes with pldatabase (or use some tool to convert
it?). If someone tackles this properly, it would be nice to get the
makefile accepted upstream.

-Truls


reply via email to

[Prev in Thread] Current Thread [Next in Thread]