User forums > Using Code::Blocks

SOLVED wxMathPlot compiling on Linux with Code::Blocks

<< < (3/3)

takeshimiya:

--- Quote from: tiwag on October 18, 2006, 05:54:12 pm ---i used your wx-config-win too and it works very well indeed.

there is only one big problem: codecompletion isn't working when
you setup your cb-project using wx-config, because the path to the
include files isn't know for CB during editing.

--- End quote ---
Well, being fair, that's the same issue all *nix/mac developers are having right now not only with wx but with almost all libraries since most of them use back-ticks for obtaining include paths, flags and libraries to link with.
So this is a really an issue of the CodeCompletion plugin which is solvable and will be fixed in the future.


--- Quote from: tiwag on October 18, 2006, 05:54:12 pm ---therefore i switched back to the standard custom-variables project setup
for my default projects.

--- End quote ---
So that's why I've made it option in the wizard for the time being, until the above issue get's resolved in CodeCompletion. :)

Patch here: https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1569&group_id=5358

rjmyst3:

--- Quote ---So that's why I've made it option in the wizard for the time being, until the above issue get's resolved in CodeCompletion. Smile
--- End quote ---

I've also been using wx-config-win of late, and it works very well - nice work!
I was just thinking how nice it would be to have a wizard using it ...  :D

arwen:
Hey boys as I must modify the mathplot lib ?  :(

Below a Build log debug of a project created with the wxWidgetApplication template without problem.

I think that my C::B and wxwidget installation is OK .
Probably there is same Errors in the MathPlot Lib but I can compile it using
wxDev-C++ http://wxdsgn.sourceforge.net/
including the mathplot.cpp and matplot.h in my application 
and I can't compile on Linux under C::B   WHY ??


--- Quote ----------------- Build: Debug in pippo ---------------
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c wx_pch.h -o wx_pch.h.gch/Debug_wx_pch.h.gch
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c app.cpp -o obj/Debug/app.o
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c main.cpp -o obj/Debug/main.o
g++ -L/usr/lib  -o bin/Debug/pippo obj/Debug/app.o obj/Debug/main.o  `wx-config --libs`
Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 0 warnings

--- End quote ---

And this below is the log when i try to compile the example of mathplot
that can be downloaded with the link in the previsius post


--- Quote ----------------- Build: Debug in Plotta ---------------
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c wx_pch.h -o wx_pch.h.gch/Debug_wx_pch.h.gch
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c mathplot.cpp -o obj/Debug/mathplot.o
g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c mp1.cpp -o obj/Debug/mp1.o
g++ -L/usr/lib  -o bin/Debug/Plotta obj/Debug/mathplot.o obj/Debug/mp1.o   `wx-config --libs` 
obj/Debug/mathplot.o: In function `mpWindow::OnCenter(wxCommandEvent&)':/home/francesco/Progetti/Plotta/mathplot.cpp:480: undefined reference to `mpWindow::SetPos(double, double)'
obj/Debug/mathplot.o: In function `mpWindow::OnScroll2(wxScrollWinEvent&)':/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::SetPosX(double)'
:/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::SetPosY(double)'
obj/Debug/mathplot.o: In function `mpWindow::UpdateAll()':/home/francesco/Progetti/Plotta/mathplot.cpp:588: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:589: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:590: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:590: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:591: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:591: undefined reference to `mpWindow::GetScaleY() const'
obj/Debug/mathplot.o: In function `mpWindow::wxCreateObject()':/home/francesco/Progetti/Plotta/mathplot.cpp:352: undefined reference to `mpWindow::mpWindow()'
obj/Debug/mathplot.o: In function `~mpWindow':/home/francesco/Progetti/Plotta/mathplot.cpp:393: undefined reference to `vtable for mpWindow'
:/home/francesco/Progetti/Plotta/mathplot.cpp:393: undefined reference to `vtable for mpWindow'
:/home/francesco/Progetti/Plotta/mathplot.cpp:393: undefined reference to `vtable for mpWindow'
obj/Debug/mathplot.o: In function `mpWindow':/home/francesco/Progetti/Plotta/mathplot.cpp:369: undefined reference to `vtable for mpWindow'
:/home/francesco/Progetti/Plotta/mathplot.cpp:369: undefined reference to `vtable for mpWindow'
obj/Debug/mathplot.o: In function `mpScaleY::Plot(wxDC&, mpWindow&)':/home/francesco/Progetti/Plotta/mathplot.cpp:304: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:304: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:305: undefined reference to `mpWindow::GetScrY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:309: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:311: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:311: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:327: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:327: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:332: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:332: undefined reference to `mpWindow::GetScaleY() const'
obj/Debug/mathplot.o: In function `mpScaleX::Plot(wxDC&, mpWindow&)':/home/francesco/Progetti/Plotta/mathplot.cpp:246: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:246: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:247: undefined reference to `mpWindow::GetScrX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:251: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:253: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:253: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:269: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:269: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:274: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:274: undefined reference to `mpWindow::GetScaleX() const'
obj/Debug/mathplot.o: In function `mpFXY::Plot(wxDC&, mpWindow&)':/home/francesco/Progetti/Plotta/mathplot.cpp:172: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:172: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:172: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:172: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:179: undefined reference to `mpWindow::GetPosX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:179: undefined reference to `mpWindow::GetScaleX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:180: undefined reference to `mpWindow::GetPosY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:180: undefined reference to `mpWindow::GetScaleY() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:194: undefined reference to `mpWindow::GetScrX() const'
:/home/francesco/Progetti/Plotta/mathplot.cpp:195: undefined reference to `mpWindow::GetScrY() const'
obj/Debug/mathplot.o: In function `mpFY::Plot(wxDC&, mpWindow&)':/home/francesco/Progetti/Plotta/mathplot.cpp:117: undefined reference to `mpWindow::GetScrY() const'
Process terminated with status 1 (0 minutes, 6 seconds)
50 errors, 0 warnings
 


--- End quote ---

Thanks newly

arwen:
EUREKA !

I find the solution and now I try to compile my application on LINUX

I can compile and run the example at aria.francesco.googlepages.com/TestPlot.tar.gz
modifing only the mathplot.h file as blelow
because the difference from a windows & LINUX compiling is there :


--- Quote ---
//#if defined(__GNUG__) && !defined(__APPLE__)
//#pragma interface "mathplot.h"
//#endif


--- End quote ---

I rem these 3 lines and i can compile it !!!!!!!

Tank's to all

arwen:
At the URL below there is my little program that I develop
with your aid
So THANKS TO ALL

:D :D :D

http://aria.francesco.googlepages.com/freeforyouacquarius

 :D :D :D

Navigation

[0] Message Index

[*] Previous page

Go to full version