Dear friends:
I want to install the Non-Uniform Rational B-Splines (NURBS) curves and surface packate NURBS++ in opensuse linux 13.1. The official web site of NURBS++ is
http://libnurbs.sourceforge.net/old/documentation.shtml. and the packate is written based on the c++ template technique.
The latest of the package is 3.0.11(2002), the help manual show it can be compiled sucessfully with gcc 3.1.0.
My opensuse linux13.1 has a gcc version of 4.8. It gives me many errors. How to make the library with a relative old c++ template syntax
Regards

Looking at the projects sourceforge page there is a patch to get the program to compile on gcc 4.3.
I suggest you download and apply that patch and see if it builds on gcc 4.8.

In case you don't know, you can install the patch using the following command in the terminal:
patch -p1 < /path/to/patch_file.patch

Note: You will need to be inside the directory containing the source code. e.g. inside the '/path/to/nurbs++-3.0.11/' directory. Where /path/to/ is wherever you have extracted the original source tarball to!

Like I said, with any luck it will compile without any problems once the patch is applied. But if there are any problems, they should be relatively trivial to fix!

Out of curiousity I took a look at this when I got home last night. It turns out that the patch mentioned above was not enough to get the program to compile under gcc 4.8. But with a little work I was eventually able to get it to build successfully.

As soon as I get a chance, I'll try to generate an all-in-one patch that will apply all of the necessary changes on top of 3.0.11. This should allow the library to build with gcc 4.8. I'll attach it to another post in this thread!

EDIT: Damn, DW won't let me upload/attach my patch... :/

Dear JasonHippy,
    Happy new year,
    How about the library.

Ha ha, oops. I completely forgot about this thread... :/ Sorry! Haven't been online a huge amount in the last year or so.

Looking at my HD, I still have the patch-file I put together for the 3.0.11 sources. But Daniweb still won't let me attach it to a message here.

My patch contains all of the changes that were in the gcc-4.3 patch, with additional changes that allow the library to build under gcc-4.8.x (on my machine at least - running Kubuntu 14.04 LTS, with gcc-4.8.4).

Assuming you are still using gcc-4.8.x it should be OK. But if you are using a more recent version of gcc, it might require further changes to allow the library to build. So I can't offer any guarantees.

I've just uploaded the all-in-one patch to my google-drive account and publicly shared it, so if you still want it, you can download it via the following link:
https://drive.google.com/file/d/0B5c6wR9mB0_pR1RrNlB2Ry1yYm8/view?usp=sharing
The patch file is called nurbsAllInOne.patch.gz

The file is compressed. So you'll need to decompress it - either via your file-manager/Desktop/GUI-based decompression program (file-roller, or some-such), or via the command-line using gunzip. After decompression, you should be left with a file called 'nurbsAllInOne.patch'.

To apply the patch:
- Open a terminal and navigate into the directory containing the nurbs-3.0.11 source-code
- Apply the patch using the following command:
[code]patch -p1 < /path/to/nurbsAllInOne.patch[/code]
Where '/path/to/nurbsAllInOne.patch' is the path to the decompressed patch-file.

Once the patch has been applied, it should just be a case of running './configure' and 'make'. As long as you have all of the relevant dependencies installed, it should successfully build, then you can use 'make install' to install it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.