Scintilla Library

Linux specific forum
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Scintilla Library

Post by Christian »

Hi!

I've downloaded the scintilla library source (for linux of course ;) ) form http://www.scintilla.org just a few days ago. After trying to compile it, I've just got an error message beginning like this:

Code: Select all

g++ `pkg-config --cflags gtk+-2.0` -DNDEBUG -Os -W -Wall -DGTK -DSCI_LEXER -I ../include -I ../src  -c PlatGTK.cxx
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
But in the RPM-packagelist in Yast2 gtk2.0 is marked as installed. Some searching in google just gave me the information that gtk is just working in Gnome. Is this right? So can I just use the scintilla library under Gnome or was it just an false information? Does anybody has an idea?

Thanks for helping! :)

Best regards
Christian
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Re: Scintilla Library

Post by spangly »

Christian wrote:Hi!

I've downloaded the scintilla library source (for linux of course ;) ) form http://www.scintilla.org just a few days ago. After trying to compile it, I've just got an error message beginning like this:

Code: Select all

g++ `pkg-config --cflags gtk+-2.0` -DNDEBUG -Os -W -Wall -DGTK -DSCI_LEXER -I ../include -I ../src  -c PlatGTK.cxx
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
But in the RPM-packagelist in Yast2 gtk2.0 is marked as installed. Some searching in google just gave me the information that gtk is just working in Gnome. Is this right? So can I just use the scintilla library under Gnome or was it just an false information? Does anybody has an idea?

Thanks for helping! :)

Best regards
Christian
you need the development version of GTK2 installed (I.E. all the headers) to be able to compile programs that use the gtk2 library.

I just test compiled the library on my gentoo system and it works fine, type the following in a shell, and see what it produces, it should list all the locations where the GTK headers and libs can be found:

Code: Select all

pkg-config --cflags gtk+-2.0
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Hi spangly!

First of all: Thank you for your answer! :)

After searching for the package and installing it (and two other), i was able to compile it. But where can I find the *.so library, which is useable for PB, now? There was just a file named 'scintilla.a' built in the '/scintilla/bin/' directory. Or did I missunderstand something?

Best regards,
Christian
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

Christian wrote:Hi spangly!

First of all: Thank you for your answer! :)

After searching for the package and installing it (and two other), i was able to compile it. But where can I find the *.so library, which is useable for PB, now? There was just a file named 'scintilla.a' built in the '/scintilla/bin/' directory. Or did I missunderstand something?

Best regards,
Christian
Scintilla only appears to compile as a static (.a) library under linux, I'm gonna have a hack around with the makefile and see if I can't make it into a shared library (.so)

When the next linux version of PB appears I'm going to be doing some proper PB stuff again, I've ditched windows competely.
Athlon64 3200, 2048mb, Ubuntu 7.10 (x64)
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

So that means there isn't a chance to use the static library in PB, right? OK then I'll wait and looking forward to the point of time you perhaps compiled a scintilla shared library. Would be nice, when you would post it here, when this will have happend. :)

But thank you very much for help!

Best regards,
Christian
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

you might want to have a look at this that I found just now...

http://www.gphpedit.org/download.php

it has a shared library called gtkscintilla2, looks like it might do the job.
Haven't tried it myself tho...
Athlon64 3200, 2048mb, Ubuntu 7.10 (x64)
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Hi!

Unfortunataly it doesn't work. Everthing seemed to be fantastic, when I tried to compile it. There was no error message and there was build a libgtkscintilla2.so.0.0.3 file in the /usr/lib directory and in the GtkScintilla2-0.0.8 folder itself. But when I tried to open the library in PB (with OpenLibrary()) there was just given back the result '0'. :cry:

Perhaps you just have a try?

Best regards,
Christian
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

You have done an 'ldconfig' after the lib installation. You can also check if you can open correctly the 'glibc' for a test..
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Hi Fred!

Yes, I've done the /sbin/ldconfig. And I was able to open all other libraries which I've tried to open before. But I can't imagine where could be the difference between this and other shared libraries. It's really a strange thing ... :?

Best regards,
Christian
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Hi!

Now after some time has gone I'm going to ask if somebody got a full functionall scintilla library? Would be very nice if somebody having it would share it ... :)

regards
Christian
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

I'm working on that right now :)

I'm faceing quite a few hoops to jump through, so far I've got a makefile and a function with the code from 'bait' in it, all links fine, just trying to workout how to remove the dependancy on main()

some background info:

scintilla.a is just an archive of .o files, scintilla.a can be importanted into purebasic eash enough, but of course it's going to need aditional code for the commands to access that infomation, or I could be leading you down the garden path here.

I'll keep you posted.

Code: Select all

# PureBasic Scintilla makefile
#
##############################################################################
# Make Veriables                                                             #
##############################################################################
# Suffixes (old fashioned acording to the Make Manual 2002 June)
.SUFFIXES: .c .o .h .a

##############################################################################
# Veriables                                                                  #
##############################################################################

# compiler options
COMPILEROPTIMIZE = -O3
CXXFLAGS= -DGTK -DSCI_LEXER -W -Wall

# includes
INCLUDE = src_scintilla.h
INCLUDEDIRS=-I../scintilla/include

# output
OUTPUTOBJS = src_scintilla.o
OUTPUTOBJARCH = src_scintilla.a
OUTPUTPUREBASICLIB = /usr/share/purebasic/purelibraries/scintilla

# paths
SCINTILLALIBA=../scintilla/bin/scintilla.a
LEXEROBJECTS=$(wildcard ../scintilla/gtk/Lex*.o)

##############################################################################
# Compiling / Linking                                                        #
##############################################################################

# Call default rule
all: src_scintilla	

# The default rule for suffix .c / .o
.c.o:
	gcc `pkg-config --cflags gtk+-2.0` $(INCLUDEDIRS) $(CXXFLAGS) $(COMPILEROPTIMIZE) -c $< -o $@

# Link
src_scintilla: $(OUTPUTOBJS) $(LEXEROBJECTS) $(SCINTILLALIBA)
	gcc `pkg-config --libs gtk+-2.0 gthread-2.0` $(COMPILEROPTIMIZE) -lstdc++ -DGTK $^ -o $@
	cp $(SCINTILLALIBA) ./src_scintilla.a
	ar rvs $(OUTPUTOBJARCH) *.o
	pblibrarymaker src_scintilla.desc /TO ./

##############################################################################
# Restoration                                                                #
##############################################################################
clean:
	rm *.o *.a
	rm src_scintilla
cleanpurelibs:
	rm /usr/share/purebasic/purelibraries/scintilla

install:
	cp src_scintilla $(OUTPUTPUREBASICLIB)
there is the current make file ;)
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Just to keep you all up with the play;

All linking issuses resoved (thanks Fred)
API for the pure library designed;
CreateScintilla(windowid(),x,y,w,h,flahs)

Unresoved, the OpenWindow has a default GTKVBox on it, scintilla widget I am guessing needs to be added to this GTKVBox, anyone know how to get around this?
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Image

Function renamed, ScintillaGadget(GadgetID,X,Y,Width,Height,[Flags])
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Inner -> Is it finished ? Would love to play with it ;)
The_Pharao
User
User
Posts: 57
Joined: Sun Jan 04, 2004 2:11 pm

Post by The_Pharao »

i would love to play with it, too :wink:

Epic Space Battles: Solar*Conflict - 3D Shoot'em up: UFO Onslaught! 3d
Post Reply