ultimate++ és az opencv, fftw......

Fórumok

Sziasztok!

Vagy 4-5 éve írtam egy egész nagy lélegzetvételű programot ultimatepp-al, amiben volt egy kis képelemzés és mest int, azóta rájöttem, hogy amit megírtam az gyak benne van az fftw3-ban és az opencv-ben sokkal jobban megírva. Arra gondolta, hogy beleraknám, hogy a konzolos programomhoz legyen egy kis minimális gui, Ne kelljen egy kilóméteres paraméterláncot hozzáraknom a parancshoz, és gnupluttal megjelenítenem stb. De hiába rakom bele a függvények legalapabb dolgait is, akár egy header-t is, idiótábbnál idiótább hibaüzeneteket kapok. Az írás végén egy lista. mintaként. Pedig 2 include állományt helyeztem csak el a kódban.

2. Az is jó lenne, ha valahogy gnuplot-os hívásokat be tudnék rakni a programba, ne kelljen skálázgatnom táblázatokat konvertálnom.......

Előre is köszönök minden építő jelegű hozzászólást.

A hibaüzenet:
MIndössze beraktam 2 include állományt:
#include >opencv/cxcore.h<
#include >opencv/cv.h<

Erre ez a marhaság jön.
/usr/include/opencv/cxtypes.h:177:5: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64’
/usr/include/opencv/cxtypes.h:299:30: error: ‘union Cv64suf’ has no member named ‘u’
/usr/include/opencv/cxtypes.h: At global scope:
/usr/include/opencv/cxtypes.h:306:9: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxtypes.h:306:9: error: ‘uint64’ does not name a type
/usr/include/opencv/cxtypes.h:308:11: error: ‘CvRNG’ does not name a type
/usr/include/opencv/cxtypes.h:315:31: error: ‘cvRandInt’ declared as an ‘inline’ variable
/usr/include/opencv/cxtypes.h:315:31: error: ‘CvRNG’ was not declared in this scope
/usr/include/opencv/cxtypes.h:315:38: error: ‘rng’ was not declared in this scope
/usr/include/opencv/cxtypes.h:316:1: error: expected ‘,’ or ‘;’ before ‘{’ token
/usr/include/opencv/cxtypes.h:324:30: error: ‘cvRandReal’ declared as an ‘inline’ variable
/usr/include/opencv/cxtypes.h:324:30: error: ‘CvRNG’ was not declared in this scope
/usr/include/opencv/cxtypes.h:324:37: error: ‘rng’ was not declared in this scope

/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64

Hozzászólások

s/</&lt;/g
s/>/&gt;/g

or PasteBin. Please.

Egyebkent megprobalkoznek egy stdint.h include-olasaval.
--


()=() Ki oda vagyik,
('Y') hol szall a galamb
C . C elszalasztja a
()_() kincset itt alant.

Az stdin.h az ok, az megy. A html-he pedig analfabéta vagyok úgyhogy a kódok közé illesztve amit mutattál:

s/
/usr/include/opencv/cxtypes.h:177:5: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64
/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64
/usr/include/opencv/cxtypes.h:177:5: error: ‘int64’ does not name a type
/usr/include/opencv/cxtypes.h:178:5: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxtypes.h:178:5: error: ‘uint64’ does not name a type
/usr/include/opencv/cxtypes.h: In function ‘int cvIsNaN(double)’:
/usr/include/opencv/cxtypes.h:283:32: error: ‘union Cv64suf’ has no member named ‘u’
/usr/include/opencv/cxtypes.h:284:31: error: ‘union Cv64suf’ has no member named ‘u’
/usr/include/opencv/cxtypes.h: In function ‘int cvIsInf(double)’:
/usr/include/opencv/cxtypes.h:298:32: error: ‘union Cv64suf’ has no member named ‘u’
/usr/include/opencv/cxtypes.h:299:30: error: ‘union Cv64suf’ has no member named ‘u’
/usr/include/opencv/cxtypes.h: At global scope:
/usr/include/opencv/cxtypes.h:306:9: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxtypes.h:306:9: error: ‘uint64’ does not name a type
/usr/include/opencv/cxtypes.h:308:11: error: ‘CvRNG’ does not name a type
/usr/include/opencv/cxtypes.h:315:31: error: ‘cvRandInt’ declared as an ‘inline’ variable
/usr/include/opencv/cxtypes.h:315:31: error: ‘CvRNG’ was not declared in this scope
/usr/include/opencv/cxtypes.h:315:38: error: ‘rng’ was not declared in this scope
/usr/include/opencv/cxtypes.h:316:1: error: expected ‘,’ or ‘;’ before ‘{’ token
/usr/include/opencv/cxtypes.h:324:30: error: ‘cvRandReal’ declared as an ‘inline’ variable
/usr/include/opencv/cxtypes.h:324:30: error: ‘CvRNG’ was not declared in this scope
/usr/include/opencv/cxtypes.h:324:37: error: ‘rng’ was not declared in this scope
/usr/include/opencv/cxtypes.h:325:1: error: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /usr/include/opencv/cv.h:58:0,
from /home/ek/MyApps/atvalto/main.cpp:2:
/usr/include/opencv/cxcore.h:674:24: error: variable or field ‘cvRandArr’ declared void
/usr/include/opencv/cxcore.h:674:24: error: ‘CvRNG’ was not declared in this scope
/usr/include/opencv/cxcore.h:674:31: error: ‘rng’ was not declared in this scope
/usr/include/opencv/cxcore.h:674:41: error: expected primary-expression before ‘*’ token
/usr/include/opencv/cxcore.h:674:43: error: ‘arr’ was not declared in this scope
/usr/include/opencv/cxcore.h:674:48: error: expected primary-expression before ‘int’
/usr/include/opencv/cxcore.h:675:32: error: expected primary-expression before ‘param1’
/usr/include/opencv/cxcore.h:675:49: error: expected primary-expression before ‘param2’
/usr/include/opencv/cxcore.h:677:40: error: ‘CvRNG’ has not been declared
/usr/include/opencv/cxcore.h:1494:23: error: ‘CvRNG’ has not been declared
/usr/include/opencv/cxcore.h:1770:1: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64
/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64
/usr/include/opencv/cxcore.h:1770:1: error: ‘int64’ does not name a type
In file included from /usr/include/opencv/cxcore.h:1826:0,
from /usr/include/opencv/cv.h:58,
from /home/ek/MyApps/atvalto/main.cpp:2:
/usr/include/opencv/cxcore.hpp:136:12: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64
/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64
/usr/include/opencv/cxcore.hpp:136:12: error: ‘int64’ does not name a type
/usr/include/opencv/cxcore.hpp:138:12: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64
/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64
/usr/include/opencv/cxcore.hpp:138:12: error: ‘int64’ does not name a type
/usr/include/opencv/cxcore.hpp:939:16: error: expected ‘)’ before ‘_state’
/usr/include/opencv/cxcore.hpp:961:5: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxcore.hpp:961:5: error: ‘uint64’ does not name a type
In file included from /usr/include/opencv/cxcore.hpp:2307:0,
from /usr/include/opencv/cxcore.h:1826,
from /usr/include/opencv/cv.h:58,
from /home/ek/MyApps/atvalto/main.cpp:2:
/usr/include/opencv/cxoperations.hpp: In constructor ‘cv::RNG::RNG()’:
/usr/include/opencv/cxoperations.hpp:1424:21: error: ‘state’ was not declared in this scope
/usr/include/opencv/cxoperations.hpp: At global scope:
/usr/include/opencv/cxoperations.hpp:1425:17: error: ‘cv::RNG::RNG’ declared as an ‘inline’ variable
/usr/include/opencv/cxoperations.hpp:1425:17: error: ‘int cv::RNG::RNG’ is not a static member of ‘class cv::RNG’
/usr/include/opencv/cxoperations.hpp:1425:17: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxoperations.hpp:1425:32: error: expected ‘,’ or ‘;’ before ‘{’ token
/usr/include/opencv/cxoperations.hpp: In member function ‘unsigned int cv::RNG::next()’:
/usr/include/opencv/cxoperations.hpp:1428:5: error: ‘state’ was not declared in this scope
/usr/include/opencv/cxoperations.hpp:1428:14: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxoperations.hpp:1428:22: error: expected primary-expression before ‘unsigned’
/usr/include/opencv/cxoperations.hpp:1428:31: error: expected ‘;’ before ‘state’
/usr/include/opencv/cxoperations.hpp: In member function ‘cv::RNG::operator double()’:
/usr/include/opencv/cxoperations.hpp:1445:15: error: reference to ‘uint64’ is ambiguous
/usr/include/opencv/cxtypes.h:150:18: error: candidates are: typedef uint64_t uint64
/home/ek/upp/uppsrc/Core/Defs.h:241:28: error: typedef long long unsigned int Upp::uint64
/usr/include/opencv/cxoperations.hpp:1445:22: error: expected ‘)’ before ‘t’
/usr/include/opencv/cxoperations.hpp:1445:78: error: expected ‘)’ before ‘;’ token
/usr/include/opencv/cxoperations.hpp: In member function ‘double cv::RNG::gaussian(double)’:
/usr/include/opencv/cxoperations.hpp:1455:14: error: ‘state’ was not declared in this scope
/usr/include/opencv/cxoperations.hpp:1455:82: error: ‘cvRandArr’ was not declared in this scope
In file included from /usr/include/opencv/cxcore.hpp:2308:0,
from /usr/include/opencv/cxcore.h:1826,
from /usr/include/opencv/cv.h:58,
from /home/ek/MyApps/atvalto/main.cpp:2:
/usr/include/opencv/cxmat.hpp: In member function ‘void cv::Mat::create(int, int, int)’:
/usr/include/opencv/cxmat.hpp:355:9: error: reference to ‘int64’ is ambiguous
/usr/include/opencv/cxtypes.h:149:17: error: candidates are: typedef int64_t int64
/home/ek/upp/uppsrc/Core/Defs.h:240:28: error: typedef long long int Upp::int64
/usr/include/opencv/cxmat.hpp:355:15: error: expected ‘;’ before ‘_nettosize’
/usr/include/opencv/cxmat.hpp:356:36: error: ‘_nettosize’ was not declared in this scope

s/>/>/g

------
3 fajta matematikus létezik. Aki tud számolni, és aki nem.

Sajnos az include-ok értéke lemaradt.
A probléma egyébként valószínűleg az, hogy az int64 típust mindkét header definiálja egymástól függetlenül.
Szerintem a megoldás valószínűleg az lesz, hogy Upp névteret külön használod, azaz kihagyod a "using namespace Upp;" sort és az Upp-s osztályok elé odaírod a névteret (Upp::).

Az is megoldás lehet, hogy csinálsz egy wrappert a nem Upp-s librarykhoz.

Ekkor arra kell figyelni, hogy a wrappert BLITZ hagyja ki:
//#BLITZ_PROHIBIT
sor kell a header fájl elejére.