Hi Davide,
It seems that the compiler cannot find oxexport.h and other files it needs. You need to make sure that these files (located in the ox/dev subdirectory) are in the compiler search path.
The easiest way to do this is to hack the makefile (threes.mak) and make sure that gcc (the compiler) receives the correct search path somewhere.
You can see the following variable in the makefile:
CFLAGS = -Wall -O2 -D__cdecl= -c
An easy way to do this is to stick something like "-I/opt/ox3.3/dev" (I installed ox under /opt/ox3.3, you would have to modify that in accordance with your installation) in there somewhere, e.g.
CFLAGS = -I/opt/ox3.3/dev -Wall -O2 -D__cdecl= -c
(These are the flags that are passed to the compiler. Why not -O3, by the way?). Maybe there is a more elegant way to do this.
See "man gcc" for details. Also, if you want to know something about makefiles (which you might, if you are compiling your own software under Linux) the best mini-howto on makefiles that I could find so far is the following: http://www.wlug.org.nz/MakefileHowto (teaches you just the basics).
Regards,
Max
-----Original Message-----
From: Davide Raggi [mailto:[log in to unmask]]
Sent: Tuesday, November 11, 2003 2:49 PM
To: [log in to unmask]
Subject: .so and Linux
Dear Ox users,
I'm trying to write a dynamic link library in Linux (Mandrake 9.1). In order
to understand how the procedure works, I tried to recompile the threes
example provided in the directory ox/dev/linux/threes/ by using
make -f threes.mak as suggested in the appendix of the manual
Unfortunately I obtain the message
>threes.c:5:22: oxexport.h: no such file or directory
plus a sequence of other not really encouraging errors
and of course if I run threes.ox, Ox show a link error message.
(note that when I tried to recomplie threes.dll under Windows I obtain similar
results ... I'm using a Open Watcom C++ compiler ver. 1.1)
In order to set up the environment variables I edited the "/etc/profile"
file by
adding the following lines
># define the path variable for Ox
>LD_LIBRARY_PATH="$HOME/ox/bin"; export LD_LIBRARY_PATH
>LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/ox/bin"; export LD_LIBRARY_PATH
>OX3PATH="$HOME/ox/include:$HOME/ox/dev:$HOME/ox"; export OX3PATH
as written in the readunix.txt file. (Ox is installed in the directory
/usr/local/lib/ox-3.30/, but I created a symbolic link to $HOME/ox so the
path variable definition should be correct)
I've checked the value of the variables through
echo $OX3PATH and echo $LD_LIBRARY_PATH
and the output seems correct.
I've also tried to insert the ox/dev directory in the LD_LIBRARY_PATH
variable,
but nothing seems to change.
I don't know if it is relevant, but the version of the c++ compiler I'm using
is gcc 3.2.2
Does anybody had similar troubles or have some idea of why the procedure is
not working?
thank you in advance for your attention
Best regards
Davide
Davide Raggi
Università degli Studi di Padova
Dipartimento di Scienze Statistiche
Via Cesare Battisti 241/243
35121 Padova - Italy
Tel. +39 049 827 4174
Fax. +39 049 827 4170
|