G++

More
11 Mar 2017 21:44 #89431 by grump
G++ was created by grump
This may not be the right place to ask but here goes:

I have been using some old apps for a goodly while now and the need has come not to run them in wine but try to compile them in Linux.
I can't get my head around the switch from cpp to gpp and make it work.

The author gives the C++ source files along with the .exe and I wondered if anyone here could either talk me through the process or fancy taking it on themselves and sharing the outcome.

All I can find is tutorials on a a basic "hello" script and I am sure there is more to it than that.

Here are the original files for your perusal cheers. www.chestnutpens.co.uk/misc/downloadsright.html

Please Log in or Create an account to join the conversation.

More
11 Mar 2017 22:11 #89434 by tommylight
Replied by tommylight on topic G++
You did not mention the one you need, but most probably this will do the job perfectly.
www.scorchworks.com/Dmap2gcode/dmap2gcode.html
Linuxcnc comes with image2gcode, but personally i fond dmap much more usable.
The following user(s) said Thank You: grump

Please Log in or Create an account to join the conversation.

More
11 Mar 2017 22:20 #89437 by grump
Replied by grump on topic G++
Thanks for the quick reply and yes I am very familiar with Scorch and use the awesome f-engrave all the time along with g-code ripper and D-map.

The main apps I am after compiling are the thread milling and the knurling scripts

Please Log in or Create an account to join the conversation.

More
11 Mar 2017 22:52 #89439 by rodw
Replied by rodw on topic G++
I am very rusty on this but have ported the other way before. I think the biggest problem you will have is dealing with the windowing API as the base code (eg a hello world command line example) will compile on both systems. Before you start, make sure it compiles in Windows. I suspect the best way forward would be to install minGW or cygwin on your Windows PC and port the code across to that environment. Then you should just be able to move the code to your Linux box and recompile. I would probably add a #define MINGW (or #define CYGWIN) and then when you get to code with errors in it, you can use conditional compilation eg:
#ifdef MINGW
   do some Linux code
#else
   do some existing Windows code
#endif

Remember, somewhere buried in your Windows system will be some make files and I tihnk for the most part MAKE is compiler independent but you can use the same conditional approach there.
The following user(s) said Thank You: grump

Please Log in or Create an account to join the conversation.

More
11 Mar 2017 23:05 #89441 by grump
Replied by grump on topic G++
Thanks to you for that answer I will try to make sense of it after some sleep.
I have installed Mingw, Code::Blocks and many other utilities, bookmarked many tutorial and instructinal pages but still can't make sense of what I am looking at.
I seem to be reading the same info wherever I attempt to get it read so much I am going in circles.
You are the first to suggest a logical approach of compiling in windoze but will that give me an exe which I don't require?
From what I can make out I only need the .cpp and .h files to compile in g++ then make them executable?

Please Log in or Create an account to join the conversation.

More
12 Mar 2017 02:53 #89455 by rodw
Replied by rodw on topic G++
What I suggested will give you a code base that should compile with gcc and therefore you can recompile it on a Liniux box. I am sorry I can't help you though as its been over 20 years since I played with this stuff so please don't assume the tools I suggested will do the job for you. There are also some gui environments that allow you to develop windowing stuff that is cross platform. wxwindows springs to mind..but remember my knowledge is dated...
The following user(s) said Thank You: grump

Please Log in or Create an account to join the conversation.

More
12 Mar 2017 08:02 - 12 Mar 2017 08:37 #89458 by grump
Replied by grump on topic G++
Thanks Rod.
Date is the biggest issue.
It seems the vcl it was originally created with is so outdated nothing will read it to link the other files if it could find them.
I now have two options if I want to continue this lunacy, to obtain the original software and find an old machine to operate it.
Or rewrite from scratch and compile it myself in Linux.
Another two if I decide to drop the case. Keep using wine or find an alternative program.
Good to thrash it out though and thanks for your help.

Better still would be for one of the python editors to take it under their wing and write one to be shared. I would love to add it to my collection of other peoples work here 1drv.ms/f/s!AtYe8fumwTS_hJEcnn-Al3ZsWd1RIw

How about it Scorch you are my hero.
Last edit: 12 Mar 2017 08:37 by grump.

Please Log in or Create an account to join the conversation.

More
12 Mar 2017 17:12 #89475 by grump
Replied by grump on topic G++
Thanks guys, Scorch is looking into for me WHOO HOO.

Please Log in or Create an account to join the conversation.

Moderators: Skullworks
Time to create page: 0.098 seconds
Powered by Kunena Forum