intersys 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/Makefile +143 -0
- data/lib/common.c +3 -7
- data/lib/common.o +0 -0
- data/lib/database.c +3 -2
- data/lib/database.o +0 -0
- data/lib/definition.c +120 -112
- data/lib/definition.o +0 -0
- data/lib/extconf.rb +23 -4
- data/lib/intersys.c +3 -15
- data/lib/intersys.h +9 -5
- data/lib/intersys.o +0 -0
- data/lib/intersys.rb +83 -62
- data/lib/intersys_cache.bundle +0 -0
- data/lib/mkmf.log +177 -0
- data/lib/object.c +2 -4
- data/lib/object.o +0 -0
- data/lib/query.c +15 -1
- data/lib/query.o +0 -0
- data/lib/test.rb +15 -0
- data/test/object.rb +14 -4
- data/test/query.rb +1 -0
- data/test/reflection.rb +12 -13
- metadata +12 -2
data/lib/definition.o
ADDED
Binary file
|
data/lib/extconf.rb
CHANGED
@@ -5,16 +5,35 @@ require "mkmf"
|
|
5
5
|
CONFIG["CC"] = "gcc -g"
|
6
6
|
|
7
7
|
|
8
|
-
alias :old_cpp_include :cpp_include
|
8
|
+
#alias :old_cpp_include :cpp_include
|
9
9
|
#def cpp_include(header)
|
10
10
|
# old_cpp_include(header) + <<-EOF
|
11
11
|
# int main(void) {
|
12
12
|
# }
|
13
13
|
#EOF
|
14
14
|
#end
|
15
|
-
#find_library "cbind", "cbind_alloc_db","/Applications/Cache/bin"
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
@cache_placements = ["/Applications/Cache", "/cygdrive/c/Progra~1/Cache", "/cygdrive/c/Cachesys"]
|
17
|
+
|
18
|
+
def locations(suffix)
|
19
|
+
@cache_placements.map {|place| place + suffix}
|
20
|
+
end
|
21
|
+
|
22
|
+
def include_locations
|
23
|
+
locations("/dev/cpp/include")
|
24
|
+
end
|
25
|
+
|
26
|
+
def library_locations
|
27
|
+
locations("/dev/cpp/lib")
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
def include_flags
|
32
|
+
" "+(include_locations.map { |place| "-I"+place} + ["-Wall"]).join(" ")
|
33
|
+
end
|
34
|
+
find_header "c_api.h", *include_locations
|
35
|
+
$CFLAGS << include_flags
|
36
|
+
#$LDFLAGS << "-Wl,-no-export-libs,cbind.lib"
|
37
|
+
find_library "cbind", "cbind_alloc_db",*library_locations
|
19
38
|
create_makefile 'intersys_cache'
|
20
39
|
|
data/lib/intersys.c
CHANGED
@@ -3,13 +3,7 @@
|
|
3
3
|
VALUE mIntersys, cDatabase, cQuery, cObject, cDefinition, cProperty, cMethod, cArgument, cObjectNotFound, cStatus;
|
4
4
|
VALUE cTime, cMarshallError, cUnMarshallError;
|
5
5
|
|
6
|
-
static VALUE my_debug(VALUE self) {
|
7
|
-
printf("Hi!\n");
|
8
|
-
return Qnil;
|
9
|
-
}
|
10
|
-
|
11
6
|
void Init_intersys_cache() {
|
12
|
-
rb_define_method(rb_mKernel, "my_debug", my_debug, 0);
|
13
7
|
rb_define_method(rb_cString, "to_wchar", string_to_wchar, 0);
|
14
8
|
rb_define_method(rb_cString, "from_wchar", string_from_wchar, 0);
|
15
9
|
|
@@ -59,25 +53,19 @@ void Init_intersys_cache() {
|
|
59
53
|
|
60
54
|
cProperty = rb_const_get(mIntersys, rb_intern("Property"));
|
61
55
|
rb_define_method(cProperty, "initialize", intersys_property_initialize, 4);
|
62
|
-
rb_define_method(cProperty, "extract_retval!", intersys_method_extract_retval, 0);
|
63
56
|
rb_define_method(cProperty, "get", intersys_property_get, 0);
|
64
57
|
rb_define_method(cProperty, "set", intersys_property_set, 1);
|
65
|
-
rb_define_method(cProperty, "marshall!", intersys_argument_set, 1);
|
66
58
|
|
67
59
|
cMethod = rb_const_get(mIntersys, rb_intern("Method"));
|
68
60
|
rb_define_method(cMethod, "method_initialize", intersys_method_initialize, 1);
|
69
|
-
rb_define_method(cMethod, "
|
70
|
-
rb_define_method(cMethod, "
|
61
|
+
rb_define_method(cMethod, "func?", intersys_method_is_func, 0);
|
62
|
+
rb_define_method(cMethod, "class_method?", intersys_method_is_class_method, 0);
|
71
63
|
rb_define_method(cMethod, "num_args", intersys_method_num_args, 0);
|
72
|
-
rb_define_method(cMethod, "
|
73
|
-
rb_define_method(cMethod, "intern_call!", intersys_method_call, 0);
|
74
|
-
rb_define_method(cMethod, "extract_retval!", intersys_method_extract_retval, 0);
|
64
|
+
rb_define_method(cMethod, "call!", intersys_method_call, 1);
|
75
65
|
|
76
66
|
cArgument = rb_const_get(mIntersys, rb_intern("Argument"));
|
77
67
|
rb_define_method(cArgument, "initialize", intersys_argument_initialize, 4);
|
78
68
|
rb_define_method(cArgument, "default", intersys_argument_default_value, 0);
|
79
69
|
rb_define_method(cArgument, "marshall_dlist_element", intersys_argument_marshall_dlist_elem, 1);
|
80
|
-
rb_define_method(cArgument, "marshall!", intersys_argument_set, 1);
|
81
|
-
// printf("Inited\n");
|
82
70
|
}
|
83
71
|
|
data/lib/intersys.h
CHANGED
@@ -15,6 +15,8 @@ struct rbDatabase {
|
|
15
15
|
struct rbQuery {
|
16
16
|
h_query query;
|
17
17
|
bool_t empty;
|
18
|
+
bool_t closed;
|
19
|
+
bool_t executed;
|
18
20
|
};
|
19
21
|
|
20
22
|
struct rbObject {
|
@@ -36,6 +38,7 @@ struct rbDefinition {
|
|
36
38
|
bool_t is_func;
|
37
39
|
bool_t is_class_method;
|
38
40
|
int num_args;
|
41
|
+
int passed_args;
|
39
42
|
void *args_info;
|
40
43
|
int arg_counter;
|
41
44
|
//Argument definitions
|
@@ -118,14 +121,14 @@ VALUE intersys_method_initialize(VALUE self, VALUE object);
|
|
118
121
|
VALUE intersys_method_is_func(VALUE self);
|
119
122
|
VALUE intersys_method_is_class_method(VALUE self);
|
120
123
|
VALUE intersys_method_num_args(VALUE self);
|
121
|
-
VALUE
|
122
|
-
VALUE intersys_method_call(VALUE self);
|
123
|
-
VALUE intersys_method_extract_retval(VALUE self);
|
124
|
+
VALUE intersys_method_call(VALUE self, VALUE args);
|
124
125
|
VALUE intersys_argument_initialize(VALUE self, VALUE r_database, VALUE class_name, VALUE name, VALUE r_method);
|
125
126
|
VALUE intersys_argument_default_value(VALUE self);
|
126
127
|
VALUE intersys_argument_marshall_dlist_elem(VALUE self, VALUE elem);
|
127
|
-
VALUE intersys_argument_set(VALUE self, VALUE obj);
|
128
128
|
|
129
|
+
// Private declarations. Not for public use
|
130
|
+
VALUE intersys_argument_set(VALUE self, VALUE obj);
|
131
|
+
VALUE intersys_method_extract_retval(VALUE self);
|
129
132
|
|
130
133
|
|
131
134
|
|
@@ -151,4 +154,5 @@ VALUE intersys_argument_set(VALUE self, VALUE obj);
|
|
151
154
|
#define PUT_DLIST(func, value) RUN(func(argument->current_dlist, DLISTSIZE, value, &elem_size))
|
152
155
|
|
153
156
|
|
154
|
-
#endif /* __cache_ruby */
|
157
|
+
#endif /* __cache_ruby */
|
158
|
+
|
data/lib/intersys.o
ADDED
Binary file
|
data/lib/intersys.rb
CHANGED
@@ -3,12 +3,16 @@ require 'dl/import'
|
|
3
3
|
require 'rubygems'
|
4
4
|
require_gem 'activesupport'
|
5
5
|
require 'active_support'
|
6
|
+
require 'enumerator'
|
6
7
|
|
7
8
|
#
|
8
9
|
# Module, keeping all classes, required to work with Cache via object and SQL interfaces
|
9
10
|
module Intersys
|
10
11
|
extend DL::Importable
|
11
|
-
|
12
|
+
begin
|
13
|
+
dlload("libcbind.dylib")
|
14
|
+
rescue
|
15
|
+
end
|
12
16
|
|
13
17
|
# Basic exception, thrown in intersys driver
|
14
18
|
class IntersysException < StandardError
|
@@ -29,6 +33,17 @@ module Intersys
|
|
29
33
|
# Error establishing connection with database
|
30
34
|
class ConnectionError < IntersysException
|
31
35
|
end
|
36
|
+
|
37
|
+
# Method can return Cache %Status. It is marshalled to this class
|
38
|
+
class Status < IntersysException
|
39
|
+
attr_accessor :code
|
40
|
+
attr_accessor :message
|
41
|
+
def initialize(code, message)
|
42
|
+
@code = code
|
43
|
+
@message = message
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
32
47
|
|
33
48
|
def self.handle_error(error_code, message, file, line)
|
34
49
|
#raise ConnectionError if error_code == 461
|
@@ -53,30 +68,9 @@ module Intersys
|
|
53
68
|
# Class representing one object method
|
54
69
|
# for internal use only
|
55
70
|
class Method < Definition
|
56
|
-
attr_accessor :args
|
57
|
-
protected
|
58
|
-
def arg!
|
59
|
-
Argument.new(@database, @class_name, @name, self)
|
60
|
-
end
|
61
|
-
public
|
62
|
-
|
63
71
|
def initialize(database, class_name, name, object)
|
64
72
|
super(database, class_name, name.to_s)
|
65
73
|
method_initialize(object)
|
66
|
-
@args = []
|
67
|
-
num_args.times do
|
68
|
-
@args << arg!
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
def call(*method_args)
|
73
|
-
prepare_call!
|
74
|
-
raise ArgumentError, "wrong number of arguments (#{method_args.size} for #{args.size})" if method_args.size > args.size
|
75
|
-
args.each_with_index do |arg, i|
|
76
|
-
arg.marshall!(method_args[i])
|
77
|
-
end
|
78
|
-
intern_call!
|
79
|
-
extract_retval!
|
80
74
|
end
|
81
75
|
end
|
82
76
|
|
@@ -90,15 +84,6 @@ module Intersys
|
|
90
84
|
end
|
91
85
|
end
|
92
86
|
|
93
|
-
# Method can return Cache %Status. It is marshalled to this class
|
94
|
-
class Status
|
95
|
-
attr_accessor :code
|
96
|
-
attr_accessor :message
|
97
|
-
def initialize(code, message)
|
98
|
-
@code = code
|
99
|
-
@message = message
|
100
|
-
end
|
101
|
-
end
|
102
87
|
|
103
88
|
require File.dirname(__FILE__) + '/intersys_cache'
|
104
89
|
|
@@ -237,7 +222,7 @@ module Intersys
|
|
237
222
|
# try to load class instance from database for this id
|
238
223
|
# ID can be not integer
|
239
224
|
def open(id)
|
240
|
-
|
225
|
+
call("%OpenId", id)
|
241
226
|
end
|
242
227
|
|
243
228
|
# Loads property definition with required name for required object
|
@@ -254,7 +239,7 @@ module Intersys
|
|
254
239
|
|
255
240
|
# call class method
|
256
241
|
def call(method_name, *args)
|
257
|
-
method(method_name, nil).call(
|
242
|
+
method(method_name, nil).call!(args)
|
258
243
|
end
|
259
244
|
alias :intersys_call :call
|
260
245
|
#def self.method_missing(method_name, *args)
|
@@ -274,7 +259,7 @@ module Intersys
|
|
274
259
|
|
275
260
|
# Call the specified method
|
276
261
|
def intersys_call(method, *args)
|
277
|
-
self.class.method(method, self).call(
|
262
|
+
self.class.method(method, self).call!(args)
|
278
263
|
end
|
279
264
|
|
280
265
|
def method_missing(method, *args)
|
@@ -282,22 +267,22 @@ module Intersys
|
|
282
267
|
if match_data = method_name.match(/(\w+)=/)
|
283
268
|
return intersys_set(match_data.captures.first, args.first)
|
284
269
|
end
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
begin
|
290
|
-
return intersys_call(method_name, *args)
|
291
|
-
rescue
|
292
|
-
end
|
293
|
-
end
|
270
|
+
return intersys_get(method_name) if has_property?(method_name)
|
271
|
+
return intersys_call(method_name, *args) if has_method?(method_name)
|
272
|
+
puts "Checking whether %#{method_name} is here: #{self.class.reflector._methods}"
|
273
|
+
return intersys_call("%"+method_name, *args) if has_method?("%"+method_name)
|
294
274
|
super(method, *args)
|
295
275
|
end
|
276
|
+
|
277
|
+
def has_property?(property)
|
278
|
+
self.class.reflector.properties.to_a.include?(property)
|
279
|
+
end
|
296
280
|
|
297
|
-
def
|
298
|
-
|
281
|
+
def has_method?(method)
|
282
|
+
self.class.reflector._methods.to_a.include?(method)
|
299
283
|
end
|
300
284
|
|
285
|
+
|
301
286
|
# Returns id of current object
|
302
287
|
def id
|
303
288
|
intersys_call("%Id").to_i
|
@@ -313,6 +298,24 @@ module Intersys
|
|
313
298
|
@database = database
|
314
299
|
native_initialize(database, query.to_wchar)
|
315
300
|
end
|
301
|
+
|
302
|
+
def each
|
303
|
+
while (row = self.fetch) && row.size > 0
|
304
|
+
#puts "Loaded row #{row}"
|
305
|
+
yield row
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
def to_a
|
310
|
+
data = []
|
311
|
+
self.each {|row| data << row}
|
312
|
+
data
|
313
|
+
end
|
314
|
+
|
315
|
+
def fill(data)
|
316
|
+
self.each {|row| data << row}
|
317
|
+
self
|
318
|
+
end
|
316
319
|
end
|
317
320
|
|
318
321
|
# Class representing Cache database connection
|
@@ -324,12 +327,8 @@ module Intersys
|
|
324
327
|
# This method creates SQL query, runs it, restores data
|
325
328
|
# and closes query
|
326
329
|
def query(query)
|
327
|
-
q = create_query(query).execute
|
328
330
|
data = []
|
329
|
-
|
330
|
-
data << row
|
331
|
-
end
|
332
|
-
q.close
|
331
|
+
q = create_query(query).execute.fill(data).close
|
333
332
|
1.upto(data.first.size) do |i|
|
334
333
|
puts q.column_name(i)
|
335
334
|
end
|
@@ -359,7 +358,11 @@ module Intersys
|
|
359
358
|
|
360
359
|
# short alias to intersys_get("Methods")
|
361
360
|
def _methods
|
362
|
-
intersys_get("Methods")
|
361
|
+
@methods ||= intersys_get("Methods")
|
362
|
+
end
|
363
|
+
|
364
|
+
def properties
|
365
|
+
@properties ||= intersys_get("Properties")
|
363
366
|
end
|
364
367
|
end
|
365
368
|
|
@@ -377,15 +380,16 @@ module Intersys
|
|
377
380
|
class_name "%Library.RelationshipObject"
|
378
381
|
|
379
382
|
def empty?
|
380
|
-
intersys_call("IsEmpty")
|
383
|
+
@empty ||= intersys_call("IsEmpty")
|
381
384
|
end
|
382
385
|
|
383
386
|
def count
|
384
|
-
intersys_call("Count")
|
387
|
+
@count ||= intersys_call("Count")
|
385
388
|
end
|
386
389
|
alias :size :count
|
387
390
|
|
388
391
|
def [](index)
|
392
|
+
return @list[index] if @loaded
|
389
393
|
intersys_call("GetAt", index.to_s)
|
390
394
|
end
|
391
395
|
|
@@ -395,18 +399,18 @@ module Intersys
|
|
395
399
|
end
|
396
400
|
end
|
397
401
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
+
include Enumerable
|
403
|
+
|
404
|
+
def to_a
|
405
|
+
load_list
|
406
|
+
end
|
407
|
+
|
408
|
+
def include?(obj)
|
409
|
+
load_list.include?(obj)
|
402
410
|
end
|
403
411
|
|
404
412
|
def inspect
|
405
|
-
|
406
|
-
each do |prop|
|
407
|
-
list << prop.name
|
408
|
-
end
|
409
|
-
list.inspect
|
413
|
+
load_list.inspect
|
410
414
|
end
|
411
415
|
alias :to_s :inspect
|
412
416
|
|
@@ -414,6 +418,23 @@ module Intersys
|
|
414
418
|
intersys_call("Insert", object)
|
415
419
|
end
|
416
420
|
alias :insert :<<
|
421
|
+
|
422
|
+
def reload
|
423
|
+
@list = nil
|
424
|
+
@loaded = nil
|
425
|
+
@empty = nil
|
426
|
+
@count = nil
|
427
|
+
end
|
428
|
+
|
429
|
+
protected
|
430
|
+
def load_list
|
431
|
+
@list ||= []
|
432
|
+
self.each do |prop|
|
433
|
+
@list << prop.intersys_get("Name")
|
434
|
+
end unless @loaded
|
435
|
+
@loaded = true
|
436
|
+
@list
|
437
|
+
end
|
417
438
|
end
|
418
439
|
end
|
419
440
|
end
|
Binary file
|
data/lib/mkmf.log
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
find_header: checking for c_api.h... -------------------- yes
|
2
|
+
|
3
|
+
"gcc -E -I. -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common conftest.c -o conftest.i"
|
4
|
+
conftest.c:1:19: error: c_api.h: No such file or directory
|
5
|
+
checked program was:
|
6
|
+
/* begin */
|
7
|
+
#include <c_api.h>
|
8
|
+
/* end */
|
9
|
+
|
10
|
+
"gcc -E -I. -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include conftest.c -o conftest.i"
|
11
|
+
checked program was:
|
12
|
+
/* begin */
|
13
|
+
#include <c_api.h>
|
14
|
+
/* end */
|
15
|
+
|
16
|
+
--------------------
|
17
|
+
|
18
|
+
find_library: checking for cbind_alloc_db() in -lcbind... -------------------- no
|
19
|
+
|
20
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
21
|
+
conftest.c: In function ‘t’:
|
22
|
+
conftest.c:4: warning: implicit declaration of function ‘cbind_alloc_db’
|
23
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
24
|
+
collect2: ld returned 1 exit status
|
25
|
+
checked program was:
|
26
|
+
/* begin */
|
27
|
+
|
28
|
+
/*top*/
|
29
|
+
int main() { return 0; }
|
30
|
+
int t() { cbind_alloc_db(); return 0; }
|
31
|
+
/* end */
|
32
|
+
|
33
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
34
|
+
conftest.c: In function ‘t’:
|
35
|
+
conftest.c:5: error: ‘cbind_alloc_db’ undeclared (first use in this function)
|
36
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
37
|
+
conftest.c:5: error: for each function it appears in.)
|
38
|
+
checked program was:
|
39
|
+
/* begin */
|
40
|
+
|
41
|
+
|
42
|
+
/*top*/
|
43
|
+
int main() { return 0; }
|
44
|
+
int t() { void ((*volatile p)()); p = (void ((*)()))cbind_alloc_db; return 0; }
|
45
|
+
/* end */
|
46
|
+
|
47
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
48
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
49
|
+
collect2: ld returned 1 exit status
|
50
|
+
checked program was:
|
51
|
+
/* begin */
|
52
|
+
int cbind_alloc_db();
|
53
|
+
/*top*/
|
54
|
+
int main() { return 0; }
|
55
|
+
int t() { cbind_alloc_db(); return 0; }
|
56
|
+
/* end */
|
57
|
+
|
58
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/Applications/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
59
|
+
conftest.c: In function ‘t’:
|
60
|
+
conftest.c:4: warning: implicit declaration of function ‘cbind_alloc_db’
|
61
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
62
|
+
collect2: ld returned 1 exit status
|
63
|
+
checked program was:
|
64
|
+
/* begin */
|
65
|
+
|
66
|
+
/*top*/
|
67
|
+
int main() { return 0; }
|
68
|
+
int t() { cbind_alloc_db(); return 0; }
|
69
|
+
/* end */
|
70
|
+
|
71
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/Applications/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
72
|
+
conftest.c: In function ‘t’:
|
73
|
+
conftest.c:5: error: ‘cbind_alloc_db’ undeclared (first use in this function)
|
74
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
75
|
+
conftest.c:5: error: for each function it appears in.)
|
76
|
+
checked program was:
|
77
|
+
/* begin */
|
78
|
+
|
79
|
+
|
80
|
+
/*top*/
|
81
|
+
int main() { return 0; }
|
82
|
+
int t() { void ((*volatile p)()); p = (void ((*)()))cbind_alloc_db; return 0; }
|
83
|
+
/* end */
|
84
|
+
|
85
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/Applications/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
86
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
87
|
+
collect2: ld returned 1 exit status
|
88
|
+
checked program was:
|
89
|
+
/* begin */
|
90
|
+
int cbind_alloc_db();
|
91
|
+
/*top*/
|
92
|
+
int main() { return 0; }
|
93
|
+
int t() { cbind_alloc_db(); return 0; }
|
94
|
+
/* end */
|
95
|
+
|
96
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Progra~1/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
97
|
+
conftest.c: In function ‘t’:
|
98
|
+
conftest.c:4: warning: implicit declaration of function ‘cbind_alloc_db’
|
99
|
+
/usr/bin/ld: warning -L: directory name (/cygdrive/c/Progra~1/Cache/dev/cpp/lib) does not exist
|
100
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
101
|
+
collect2: ld returned 1 exit status
|
102
|
+
checked program was:
|
103
|
+
/* begin */
|
104
|
+
|
105
|
+
/*top*/
|
106
|
+
int main() { return 0; }
|
107
|
+
int t() { cbind_alloc_db(); return 0; }
|
108
|
+
/* end */
|
109
|
+
|
110
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Progra~1/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
111
|
+
conftest.c: In function ‘t’:
|
112
|
+
conftest.c:5: error: ‘cbind_alloc_db’ undeclared (first use in this function)
|
113
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
114
|
+
conftest.c:5: error: for each function it appears in.)
|
115
|
+
checked program was:
|
116
|
+
/* begin */
|
117
|
+
|
118
|
+
|
119
|
+
/*top*/
|
120
|
+
int main() { return 0; }
|
121
|
+
int t() { void ((*volatile p)()); p = (void ((*)()))cbind_alloc_db; return 0; }
|
122
|
+
/* end */
|
123
|
+
|
124
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Progra~1/Cache/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
125
|
+
/usr/bin/ld: warning -L: directory name (/cygdrive/c/Progra~1/Cache/dev/cpp/lib) does not exist
|
126
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
127
|
+
collect2: ld returned 1 exit status
|
128
|
+
checked program was:
|
129
|
+
/* begin */
|
130
|
+
int cbind_alloc_db();
|
131
|
+
/*top*/
|
132
|
+
int main() { return 0; }
|
133
|
+
int t() { cbind_alloc_db(); return 0; }
|
134
|
+
/* end */
|
135
|
+
|
136
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Cachesys/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
137
|
+
conftest.c: In function ‘t’:
|
138
|
+
conftest.c:4: warning: implicit declaration of function ‘cbind_alloc_db’
|
139
|
+
/usr/bin/ld: warning -L: directory name (/cygdrive/c/Cachesys/dev/cpp/lib) does not exist
|
140
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
141
|
+
collect2: ld returned 1 exit status
|
142
|
+
checked program was:
|
143
|
+
/* begin */
|
144
|
+
|
145
|
+
/*top*/
|
146
|
+
int main() { return 0; }
|
147
|
+
int t() { cbind_alloc_db(); return 0; }
|
148
|
+
/* end */
|
149
|
+
|
150
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Cachesys/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
151
|
+
conftest.c: In function ‘t’:
|
152
|
+
conftest.c:5: error: ‘cbind_alloc_db’ undeclared (first use in this function)
|
153
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
154
|
+
conftest.c:5: error: for each function it appears in.)
|
155
|
+
checked program was:
|
156
|
+
/* begin */
|
157
|
+
|
158
|
+
|
159
|
+
/*top*/
|
160
|
+
int main() { return 0; }
|
161
|
+
int t() { void ((*volatile p)()); p = (void ((*)()))cbind_alloc_db; return 0; }
|
162
|
+
/* end */
|
163
|
+
|
164
|
+
"gcc -g -o conftest -I. -I/Applications/Cache/dev/cpp/include -I/opt/local/lib/ruby/1.8/powerpc-darwin8.4.0 -O -pipe -I/opt/local/include -O -pipe -I/opt/local/include -fno-common -pipe -fno-common -I/Applications/Cache/dev/cpp/include -I/cygdrive/c/Progra~1/Cache/dev/cpp/include -I/cygdrive/c/Cachesys/dev/cpp/include -Wall conftest.c -L"/opt/local/lib" -L"/cygdrive/c/Cachesys/dev/cpp/lib" -L/opt/local/lib -lruby-static -lcbind -lpthread -ldl -lobjc "
|
165
|
+
/usr/bin/ld: warning -L: directory name (/cygdrive/c/Cachesys/dev/cpp/lib) does not exist
|
166
|
+
/usr/bin/ld: can't locate file for: -lcbind
|
167
|
+
collect2: ld returned 1 exit status
|
168
|
+
checked program was:
|
169
|
+
/* begin */
|
170
|
+
int cbind_alloc_db();
|
171
|
+
/*top*/
|
172
|
+
int main() { return 0; }
|
173
|
+
int t() { cbind_alloc_db(); return 0; }
|
174
|
+
/* end */
|
175
|
+
|
176
|
+
--------------------
|
177
|
+
|