Sign in to follow this  
Dysprosium

Setting up a library

Recommended Posts

I have posted this here, because it received no attention on the OpenGL forum and indeed, this might be more of a beginner's question. Dear fellow programmers, I have been trying to set up FTGL for hours now, but since no one has ever properly taught me how to set up anything, all I can do is mess around and try what works. So far this has failed for FTGL. I really want to get started with learning how to create text in an OpenGL application. Right now I have downloaded the zipped folder from FTGL and put all the headers I found in the include folder into the include folder of my compiler (I am using Bloodshed Dev-cpp because it's what I started with). I have done the same for the header files from the include folder in the FreeType2 zip, which is, of course, necessary. Now, I don't really know what more there is to do. There is no executable file that seems to do anything. There is 'vms_make.com' which executes, but doesn't seem to do anything. What else am I supposed to do to get FTGL to work? The demo currently doesn't compile and only gives a Build error. The linkers all seem to work, but the compile log shows this at the end: "../Documents and Settings/My Name/Bureaublad/FTGL/demo/trackball.o" -o "Text2.exe" -L"C:/Dev-Cpp/lib" g++ ftgl_demo.o -L/usr/local/lib -lGLU -lGL -lfreetype -lz -lftgl -lglut -o ftgl_demo g++.exe: g++: No such file or directory g++.exe: ftgl_demo.o: No such file or directory make.exe: *** [Text2.exe] Error 1 Execution terminated I am a total noob at this and can't seem to find any help whatsoever. I have googled for hours now and am exhausted and desperate. Does anyone know anything that might help me? Thanks in advance, An enthusiastic noob: Dysprosium

Share this post


Link to post
Share on other sites
Please keep in mind that I have never used FTGL.

I have just looked at the library. It looks like alot of other libraries, but it does not come with the library files. This means, you will need to compile the source first to produce the library files.

I dont think they developed this with djgpp in mind. In other words, there is no guarantee that you will not get errors when working with this library. They should be fixable, though.

Opening up the static project workspace for MSVC++, you will need to predefine the following constants to build the source as a static library:

_DEBUG WIN32 _LIB FTGL_LIBRARY_STATIC

The first 3 may already be defined by the compiler, so just define FTGL_LIBRARY_STATIC in your command line, and compile and link the source code.

I have not used djgpp in some time, so cannot help you here.

It does not seem to require any additional dependencies, so this should be all you need to do.

----------

After this, if it was successful, you should now have your static library file. Link this static library file into your main project, and #include the correct library header files; and it should work fine.

Hope this gives you some direction...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this