You are here:

C++/Visual C++ & SRGP library


I've written a C++ program making use of the SRGP library. It's compiled on linux using a makefile that links it with my universities copy of the SRGP library, SRGP is a 2D graphics package for C/C++.

Anyway, I *REALLY* need this program converted to Windows so I can show it to prospective employers asap, and I've been trying and trying.

I've downloaded the windows SRGP library from here:{25B96B4D-59FA-4E13

It unzips giving directories containing .C, .H and .LIB files, but there are no instructions. I've been asking everyone I can think of but no one can help. How can I compile my code against the windows version of SRGP??

I'm using Windows XP and I have Visual C++ 6. I added my source code, along with all the .C, .H and .LIB files that came with SRGP to a project and added the .LIB file to the list under Project->Settings->Link, but on compilation I get some 70+ errors like:

syntax error : missing ';' before identifier 'line_style'

referring to a line:

  lineStyle line_style;

All referring to the SRGP files. It doesn't recognise any of the type names, or can't find the type specifications. It also complains

Cannot open include file: 'srgploca.h': No such file or directory

many times in reference to a lot of different files.

Can you give me any kind of clue as to what I can do? How do I use SRGP with VC++, or how do I use libraries like this in general with VC++?? Or is there another way to convert my program to Windows?

I would be extremely grateful, I have people who've asked to see my work and this demo I think is pretty good and is also the only relevant thing I have.

Thanks in advance for anything you can do. If it will help I could provide the SRGP extractable and my source code by email.
- Sean.

Sean, Thank you for your question.

I regret that I am unable to take the time to study your source code due to the volume of questions received.

It sounds to me that you have not obtained all the .h files needed by the .c files. Since I am not familiar with the SRGP library I cannot offer any specific advice.

In general, porting graphis code from Unix to Windows is very difficult.

I suggest that you post this question at, which is more advanced than

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2017 All rights reserved.

[an error occurred while processing this directive]