Вот, уважаемый ALL, приятель просил вопрос спросить. Сам я в приплюснутом ноль, поэтому у знатаков спрашиваю.
----------------
Сейчас ругается линкер:
karennhullsurface.o(.text+0x1274): In function `KarennHullSurface::parseForBodyPoints()':
: undefined reference to `KarennNurbsSurface::doApproxX(p5d const&, p5d const&, double)'
karennhullsurface.o(.text+0x194b): In function `KarennHullSurface::parseForBreadthPoints()':
: undefined reference to `KarennNurbsSurface::doApproxZ(p5d const&, p5d const&, double)'
karennhullsurface.o(.text+0x2354): In function `KarennHullSurface::parseForProfilePoints()':
: undefined reference to `KarennNurbsSurface::doApproxY(p5d const&, p5d const&, double)'
karennhullsurface.o(.text+0x25f0): In function `KarennHullSurface::parseForProfilePoints()':
: undefined reference to `KarennNurbsSurface::doApproxY(p5d const&, p5d const&, double)'
collect2: ld returned 1 exit status
make[2]: *** [karenn] Ошибка 1
хотя вроде бы inline функции определены, вот одна из них:
inline
p5d KarennNurbsSurface::doApproxX(const p5d& p1, const p5d& p2, double inX) {
double du;
p5d result;
du=(inX-p1.x)/(p2.x-p1.x);
result.x=inX;
result.y=p1.y +(p2.y-p1.y)*du;
result.z=p1.z+ (p2.z-p1.z)*du;
result.u=p1.u+(p2.u-p1.u)*du;
result.v=p1.v+(p2.v-p1.v)*du;
return result;
}
-------------------
Это хде?
# ./configure --help
`configure' configures this package to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local/kde]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/kde/bin', `/usr/local/kde/lib' etc. You can specify
an installation prefix other than `/usr/local/kde' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-fast-perl disable fast Makefile generation (needs perl)
--enable-debug=ARG enables debug symbols (yes|no|full) default=no
--disable-debug disables debug output and debug symbols default=no
--enable-strict compiles with strict compiler options (may not work!)
--disable-warnings disables compilation with -Wall and similiar
--enable-profile creates profiling infos default=no
--enable-pch enables precompiled header support (currently only KCC) default=no
--enable-final build size optimized apps (experimental - needs lots of memory)
--disable-closure don't delay template instantiation
--enable-shared[=PKGS]
build shared libraries [default=yes]
--enable-static[=PKGS]
build static libraries [default=no]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-objprelink prelink apps using objprelink (experimental only tested on linux/386)
--enable-embedded link to Qt-embedded, don't use X
--enable-qtopia link to Qt-embedded, link to the Qtopia Environment
--disable-mt link to non-threaded Qt (deprecated)
--enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.
--disable-threading disables threading even if libpthread found
--disable-rpath do not use the rpath feature of ld
--disable-path-check don't try to find out, where to install
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags=TAGS include additional configurations [CXX,GCJ]
--with-xinerama enable support for Xinerama
--with-extra-includes=DIR
adds non standard include paths
--with-extra-libs=DIR adds non standard library paths
--with-qt-dir=DIR where the root of Qt is installed
--with-qt-includes=DIR where the Qt includes are.
--with-qt-libraries=DIR where the Qt library is installed.
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
>приятель просил вопрос спросить. Сам я в приплюснутом ноль, поэтому у знатаков спрашиваю
мопед не мой, я просто разместил объяву (ц)
Линкер правильно делает, что ругается. Функция класса определена как inline -- это задача компилятора разместить ее в коде. Компилятор должен видеть что она inline (проверьте определение класса) и иметь текст inline-функции (можно включить прямо в .h файл).
Обходные пути -- удалите спецификатор inline или включите текст функции прямо в определение класса.
virtual ~ KarennNurbsSurface ();
/** do the real work of construction of the surface*/
virtual void initializeSurface (QString inSurfaceName,
double inYAxisPosition,
.............
skipped
.............
protected
..............
skipped
................
inline p5d doApproxX(const p5d& p1, const p5d& p2,double inX);
/** computes the 3D pointwhose y()= inY which should be the closest
to the point of the surface with the same y(). p1 and p2 should
be the image resp of f(u) and f(u+1). The estimation is done
by the approximation f(u+du)=f(u)+duf'(u)*/
inline p5d doApproxY(const p5d& p1, const p5d& p2,double inY);
/** computes the 3D pointwhose z()= inZ which should be the closest
to the point of the surface with the same z(). p1 and p2 should
be the image resp of f(u) and f(u+1). The estimation is done
by the approximation f(u+du)=f(u)+duf'(u)*/
inline p5d doApproxZ(const p5d& p1, const p5d& p2,double inZ);