User forums > Using Code::Blocks

Using Code::Blocks with HeeksCAD

(1/3) > >>

jonas thomas:
Hi,
I've been trying to get HeeksCAD to run using C:B's as the IDE on 32 bit 8.04 Ubuntu  http://code.google.com/p/heekscad/source/browse/#svn/trunk/src%3Fstate%3Dclosed
Initially, I compiled using the Makefile and afterwards I tried building a project using Code::Blocks
Initially I tried to build using the Makefile and after a couple attempts decided to setup the project in Code::Blocks.

I managed to get the point of getting an executable but I'm getting the following errors:
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/new.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/open.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/save.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/cut.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/copy.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/paste.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/undo.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/redo.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/select.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/lines.png': file does not exist.
07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/circles.png': file does not exist.

I need to get the program to look at:
/usr/local/share/heekscad/bitmaps/circles.png (among others)

I guess I need to get this from the makefile somewhere into the project:
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
DATADIR=$(PREFIX)/share
HEEKSCADDIR=$(DATADIR)/heekscad
PIXMAPSDIR=$(DATADIR)/pixmaps
APPSDIR=$(DATADIR)/applications

Where should I stick that?
I tried building the project rather than using the existing prebuilt most for practise. 
Would I be better off using the Makefile from the heeksCAD project.

I'm am sooooo... close to getting this to working...  Rides here... gotta go to work....







PsYhLo:
on my system compile and runs
but it eventually crash with

--- Code: ---psyhlo@psyhlo-laptop:~$ HeeksCAD
The program 'HeeksCAD' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 1919 error_code 8 request_code 70 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

--- End code ---

jonas thomas:
I'm a very confused here.

When I built HeeksCAD outside of C::B using the provide makefile the executable was placed:
/usr/local/bin
and the graphics where placed in:
/usr/local/shared/heekscad/bitmaps
/usr/local/shared/heekscad/icons

I have the project located in
/home/jonas/HeeksCAD

I tried to use the existing makefile ie, Project>Properties>Project Setting and selected  /home/jonas/HeeksCAD/src I got the message:


--- Code: ----------------- Build: Debug in HeeksCAD ---------------

Using makefile: Makefile
make: *** No rule to make target `Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
--- End code ---
So I figured since no rule was setup for Debug.. I'd just build the project through the IDE.

When I build and run (without the custom  makefile) the log puts out this message.

--- Quote ---Checking for existence: /home/jonas/HeeksCAD/HeeksCAD
Executing: xterm -T HeeksCAD -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/home/jonas/HeeksCAD/interface /home/jonas/HeeksCAD/HeeksCAD  (in /usr/local/bin)

--- End quote ---

But I still get the error messages from the executable:

--- Code: ---07:02:01 PM: Can't load image from file '/home/jonas/HeeksCAD/bin/Debug/../share/heekscad/bitmaps/new.png': file does not exist
--- End code ---
I interpret this to mean IDE is executing the program from /home/jonas/HeeksCAD/bin/Debug/ is try to back up one directory  then search the graphics through the path.  Put...that makes absolutely sense is  /home/jonas/HeeksCAD/bin/Debug/ doesn't exist.

I thought all I had to do was change the project>properties>Build Targets>Execution working directiory>/usr/local/bin
Made sense to me.. but I still get the same error.  I know  I'm missing something really basic here (I just don't get it at this point)
Anyone??
I wanted to post the project file put I exceeded the 20000 character limit... But... I did post it here:
http://www.metalshaperman.com/?p=171

Jenna:

--- Quote from: jonas thomas on June 06, 2009, 04:43:26 pm ---So I figured since no rule was setup for Debug.. I'd just build the project through the IDE.

--- End quote ---

If you use custom makefiles, you have to name your targets as the appropriate makefile rules, or adjust the make commands in the projects build options (tab "Make commands").
Project-wide make commands are only used, if no target make commands exist.

deadneurons:
I'm also watching the progress of HeeksCAD, I'm a hobbycnc'ist.
Can you try this cbp, place it inside the HeeksCAD dir where src, interface, tinyxml are,
You must change the path for stdafx.h, on some headers,  changed the path of some includes in HeeksCADInterface.cpp.
you also have to specify the casroot in global variables.
I didn't finish the compilation but it's halfway through when I canceled it since I already have it built via makefile.
Hopefully this works.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version