Undefined reference to `_imp___ZN7CxImageC1Ej'
-
-
It should only be plugin, so it generates a dll file to be used in another application.
-
How do you mean include those sources? You mean physically copy those files into PCXFilter folder and include them in .pro file?
-
I have just done that and have the .pro file in the following manner:
@HEADERS +=
pcxfilter.h
pcxfilter_global.h
color.h \ <-new ones from imagelib
format.h
etc.
interfaces/effectinterface.h \ <-new ones from imagelib
interfaces/exportimportinterface.h
etc.
CxImage/lib_export.h \ <-new ones from CxImage
CxImage/xfile.h
etc.SOURCES +=
pcxfilter.cpp \ <-new ones from imagelib
color.cpp
etc.
CxImage/ximage.cpp \ <-new ones from CxImage
CxImage/ximapcx.cpp
etc.@I receive the folllowing errors: (I've included some, the others look like these, just different files)
@ exportimportinterface.h: No such file or directory
ximage.h: No such file or directory
'img' was not declared in this scope
expected type-specifier before 'CxIOFile'
@ -
Come on guys, I really need this in the following day. I've done everything I could think of, but I still get errors.
-
-
I've managed to compile and link cximage library using Code:Blocks (which has newer version of MinGW 4.7, which might be the problem, cximage library wasnt linking properly in QtCreator with MinGW 4.4). I have also tested the following code: (which I linked with libcximage.a i libgdi32.a libraries), and this code works. This was also compiled and linked in Code::Blocks.
I have downloaded Qt5.0.1 which has MinGW 4.7 integrated, so I'll try with that.//////////////////////////////////////////////////////
#include <iostream>
#include <ximage.h>using namespace std;
int main()
{
CxImage img;
img.Load("Pesti_BASH.pcx", CXIMAGE_FORMAT_PCX);
if(img.IsValid()){
if(img.Save("Test.pcx", CXIMAGE_FORMAT_PCX))
cout << "Successfully saved the image.\n";
else
cout << "Failed to save the image.\n";
} else {
cout << "Not a .pcx format or corrupted image.";
}
return 0;
}
//////////////////////////////////////////////////////By the way, does anyone know why is QtCreator so problematic. I have also noticed that Code::Blocks has much better project configuration in comparison with QtCreator, which is comprised of .pro file, which you need to edit by yourself, knowing all the variables that need to be declared beforehand.
-
Guys I have been just told that I need to use the version of the compiler that will be compatible with both Windows and Linux, which is MinGW but 4.4 version, the one I've started using at the beginning. Please help me guys.