NO

Author Topic: Please help 2d plotter!!! T_T  (Read 18061 times)

JohnF

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #15 on: July 26, 2007, 11:54:44 AM »
The way the paths are used by the IDE is somewhat annoying I should ask Pelle to modify the behaviour to make projects more portable.

One way to simplify things would be to have only one place to set the folders, say under the Tools/Options dialog, all the necessary includes could be done there, no real need to have separate settings for projects.

Or, if one needs a header from another folder write the appropriate line in the code - if one has provided the necessary directory structure of course.

Example:
#include "Neat.h"
#include "..\View\View.h"

John

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Please help 2d plotter!!! T_T
« Reply #16 on: July 26, 2007, 02:17:29 PM »
g2_anim.ppj and g2_demo.ppj should use relative INCLUDE and LIB paths for g2 files.
Like ..\g2_dll
Code: [Select]
INCLUDE = C:\Program Files\PellesC\Include;C:\Program Files\PellesC\Include\Win;C:\Program Files\PellesC\Include\Win\gl;..\g2_dll#
LIB = C:\Program Files\PellesC\LIB;C:\Program Files\PellesC\LIB\WIN;..\g2_dll#
May the source be with you

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #17 on: July 26, 2007, 09:04:14 PM »
I still dont know what you mean by: "build the g2_dll project" Do i need to create a new project and call it g2_dll?... how do you build? I cant just right click and press build or just open up pelles and press the build button. The file g2_dll.dll does not exsist, theres a g2_dll.LIB and .ppx but theres no .dll.

Please show me how to "build" the g2_dll project.

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #18 on: July 26, 2007, 10:09:53 PM »
grrr... now i messed up one of the projects. I opened up g2_dll.ppj and right clicked some source code looking  thing that said g2_dll.dll in bold letters and added the files to one of the demos and hit the compile button and a hole bunch of errors came up.

I'm guessing that is not the way to build projects then.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Please help 2d plotter!!! T_T
« Reply #19 on: July 26, 2007, 11:02:52 PM »
One way to build dll is to load g2_dll.prj and press Ctrl+B.

May the source be with you

Offline DMac

  • Member
  • *
  • Posts: 272
Re: Please help 2d plotter!!! T_T
« Reply #20 on: July 26, 2007, 11:53:02 PM »
Ok Let's take this one step at at time.

Since I don't know what you did to the demo I suggest doing the following:

1.  Open the "C:\Program Files\PellesC\Projects" folder and delete the "g2_workspace" folder located there.

2.  Go to my previous post and download the the g2_workspace.zip attatchment again.

3.  Unzip this into C:\Program Files\PellesC\Projects.

4.  Open the "C:\Program Files\PellesC\Projects\g2_workspace\g2_dll" folder.

5.  Find and click on the g2_dll.ppj.

6.  Now that the project is opened in Pelles IDE click on the "Project" menu.

7.  From the drop down select "Build g2_dll."

     At this point Pelles will compile the source into g2_dll.dll.

8.  Once the build is finished Open "C:\Program Files\PellesC\Projects\g2_workspace\g2_dll" folder.

9.  Find the file "g2_dll.dll." and copy it.

10.  Open "C:\Program Files\PellesC\Projects\g2_workspace\g2demo folder" and paste g2_dll.dll there.

11.  Find and click on the g2demo.ppj.

12.  Now that the project is opened in Pelles IDE click on the "Project" menu.

13.  From the drop down select "Execute g2demo.exe"

And there you have it 13 steps to success.

David M.
No one cares how much you know,
until they know how much you care.

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #21 on: July 27, 2007, 03:45:24 AM »
thx but there is still a problem it wont let me build it says:

Could not find <windos.h>

do i just add it to library? i havent tryed it yet.

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #22 on: July 27, 2007, 03:55:43 AM »
never mind i added the stuff i needed to the library. Do i have to add .dll too or does this progrm take long to load becuase it executed fine but it was taking long so i closed it and then it crashed.

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #23 on: July 27, 2007, 04:00:09 AM »
a pop up menu pops out when i execute it and it says: dll process attach.
Is that bad or good? Do i need to give it some time? I gave the program almost an hr to load but nothing appears, there has to be something wrong. This program is not responding.
« Last Edit: July 27, 2007, 06:01:32 AM by hellohowru? »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: Please help 2d plotter!!! T_T
« Reply #24 on: July 27, 2007, 12:19:42 PM »
The program works exactly as you have seen.
The popups are coded in the library to inform you that you're attaching detaching from the library. If you don't like them comment them out from the code and recompile the library.
The program crash: yes it's not so well coded, if you close the graphical window the consolle crashes! Try to close the console window and it will not crash.
G2 needs some fixing to work properly, and this is not my top interest at the moment, if you're a programmer study it and make your corrections, if you want just a graphical tool this way could be very exhausting, you have to learn programming to use it  ::)!!


John, for the IDE's paths I was wondering about a macro like $(WIN_INC) that the IDE automatically translates to the default installation paths, in this case the 'standard places' are removed from the include and library folders configuration. If you need more paths you can continue to add them as you do now. You're right about the use of paths in the includes, but it is a problem when you import a project from others like g2 or sqlite, etc. You have to manually correct all modules.
Another problem is the project archiving that retains in the zip the absolute path, once again you cannot install an archived project in a directory different from the original.
« Last Edit: July 27, 2007, 12:30:18 PM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

JohnF

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #25 on: July 27, 2007, 01:21:19 PM »
John, for the IDE's paths I was wondering about a macro like $(WIN_INC) that the IDE automatically translates to the default installation paths, in this case the 'standard places' are removed from the include and library folders configuration. If you need more paths you can continue to add them as you do now. You're right about the use of paths in the includes, but it is a problem when you import a project from others like g2 or sqlite, etc. You have to manually correct all modules.
Another problem is the project archiving that retains in the zip the absolute path, once again you cannot install an archived project in a directory different from the original.

I have no objections to a macro, of course the decision is Pelle's to make.

As for adjusting other peoples projects, I guess that will always be the case as different compilers have slightly different ways of doing things. The current problem is that the OP is trying to run before he can walk. Hope he learns from the experience.

Are you sure about the project archiving? I just tried it and it seems ok to me.

Anyway, lets see what Pelle has to say on the matter.

John

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: Please help 2d plotter!!! T_T
« Reply #26 on: July 27, 2007, 01:48:24 PM »
Are you sure about the project archiving? I just tried it and it seems ok to me.

Yes but only for workspaces, for a single project it uses relative paths, probably he's trying to retain libraries and includes path definition. This is probably because when you add folders for libraries or includes he stores absolute paths.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

JohnF

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #27 on: July 27, 2007, 06:35:42 PM »
Are you sure about the project archiving? I just tried it and it seems ok to me.

Yes but only for workspaces, for a single project it uses relative paths, probably he's trying to retain libraries and includes path definition. This is probably because when you add folders for libraries or includes he stores absolute paths.

Absolute paths make life more difficult - maybe Pelle will read this thread.

John

hellohowru?

  • Guest
Re: Please help 2d plotter!!! T_T
« Reply #28 on: July 28, 2007, 07:11:52 AM »
The program crash: yes it's not so well coded, if you close the graphical window the consolle crashes! Try to close the console window and it will not crash.

You claim that there is a graphical window here but i only get a console window and the popup that says dll message 1. When i execute the program i get no graphical window. Do i need to add something else? I've tryed to execute another program (something call arc..) and i get the same thing: The empty console and the little popup that says dll message 1. Intuition tell me i need to see an arc some where, since this is after all a graphical program.

For the other demo, i read the code its supposed to print out "random walk" then create the random walk but the console does nothing and there is no graphics window.
« Last Edit: July 28, 2007, 08:51:47 PM by hellohowru? »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: Please help 2d plotter!!! T_T
« Reply #29 on: July 30, 2007, 06:03:25 PM »
The windows that pops up contains a button, if you don't press that button the program does'nt continue.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide