![]() |
|
#1
|
|||
|
|||
Use FLTK with code::blocksHi,
I am used to programming in C++ using Visual Studio 6 and I wanted to change. I want to use free tools from now on and to make portable software as well. I've downloaded Code::Blocks and I wanted to use fltk with it. But when I choose to create a fltk project it ask me about fltk's location. I downloaded fltk-1.1.8rc2-source.zip from the site of fltk. Is this what I need? Can someone tell me the steps I should follow to make this work? Thank you in advance!!! Pam |
|||
|
#2
|
|||
|
|||
Re: use fltk with code::blocksPam,
I am doing the EXACT same thing as you right now. I tried out bloodshed Dev-c++ (comes with Mingw), openwatcom, quincy(comes with mingw). So far, I like code::blocks the most. Is the nicest looking GUI. Also, unlike the other ones, it can run on Windows, linux, plus a few other UNIX based operating systems too. I am simply telling you to not waste your time trying the other compilers and IDEs if you are having difficulty setting up FLTK right now with code::blocks. My first question is that did you ever use FLTK before? I have done so for about a year with Visual Studio 6 and 2005. Let me start to tell you about a bug in the FLTK project option in code::blocks. Personally, I uncompressed FLTK in a directory called c:\fltk-1.1.8. It will create many directories, among FL (it has the .H include files) and lib. Code::blocks will want a c:\fltk-1.1.8\include\FL\ directory, so you will have to make one and copy the contents of FL. When you start up an FLTK project, it will ask for directory locations and actually test for the existence of many files. If code::blocks lets you go through, that is a good sign. When you build the FLTK libraries, you have a choice to make: build release target or debug target. Do both. The debug target will create libraries files ending as ___d.lib while the release target with not have a letter 'd' in the end. For the actual .lib creation, FLTK was created with several compilers in mind. If you look an the subdirectories, there should be some directory names with mingw, watcom, visual studio 6, visual studio .net 2005. (I am typing this from memory without looking at the directory names. The network is disabled on my Win and I am typing this from Linux where I can't mount that particular drive at the moment). Code::blocks comes with the mingw compiler, so one route would be to figure out how to work with code::blocks and the c:/fltk-1.18/mingw directory, while another one would be to download the mingw compiler using instructions over at: http://www.fltk.org/articles.php?L598+I0+T+M10+P1+Q and once the .lib files are all done, just develop with code::blocks. Now, I haven't finished getting everything to work yet. I am wondering if the .lib files that I created with M$ Visual studio will work with other compilers. I made a thread in the gidforums cpp section asking about the .lib compatibility, with no response yet. Let me know if you have success. I will probably be tackling the problem today. Frank P.S. There is also more mingw compiler information at: http://www3.telus.net/public/robark/ I |
|
#3
|
|||
|
|||
Re: use fltk with code::blocksEven more info in this forum:
http://www.gidforums.com/t-10094.html |
|
#4
|
|||
|
|||
Re: use fltk with code::blocksAdding more discoveries:
Library files compiled with mingw are not .lib, they are lib____.a. To create the library files, I used the File->import project menu item and imported ms visual studio 2005 project file starting with the letters fltk from the project directory. Next, I built it as a debug and release to create libfltk.a and libfltkd.a in the C:\fltk-1.1.8\lib directory. To actually create a fltk program, I just went to file, then chose a new project and chose a FLTK project. Code::blocks will automatically set up the project configuration to retrieve the proper libraries in the proper directories. It will also create a main.cpp with some sample code. Build this and everything should work. Frank |
|
#5
|
|||
|
|||
Re: use fltk with code::blocksHi!!!
Thank you for your answers. But I still have problems. First of all let me tell you I have never worked with fltk, but as I am starting a new project I thought it was a good oportunity to start. As I told you in my post I downloaded the fltk-1.1.8rc2 zip file. As you said it has many folders but I can't find the folder named mingw. All the folders I have are: borlandc, CMake, documentation, FL, fluid, jpeg, lib, makefiles, png, src, test, vc2005, vcnet, visualc, watcom, zlib. I have some problems building the library, how should I do? I have never built a library, I always used the default libraries. For example when I worked with Visual C++ I used the MFC library. Can you tell me the easiest way to built the library to be able to use it. If I can use Code::Blocks to built it it would be simpler I think. But as I told you I don't have the folder mingw. I would be pleased with any help. I've tried doing file, import project, but the options I have are: Dev-C++ project…, MS Visual C++ project…, MS Visual C++ workspace…, MS Visual Studio project..., MS Visual Studio solution… and I don't know what to do. Well, that's all for now. Waiting for your help. And thanks a lot for your replies!!!!!!! Pam |
|
#6
|
|||
|
|||
Re: use fltk with code::blockstry to import visual project files from CodeBlocks
or install mingw32 and msys by using msys Quote:
then open C::B Settings->Compiler and Debugger Settings->Search Directories Compiler tab add FLTK installed directories Linker tab add lib directories of FLTK thats all |
|
#7
|
|||
|
|||
Re: use fltk with code::blocksPam,
If you like, I can send you a link to my personal file storage area and I'll place all the library files all compiled for mingw and visual studio for both debug and release. Enable the private message feature in your gidforum profile. We'll continue the discussion in the public post. You would not need to go through all the troubles. I take it you want a makefile too? I have some extra notes to post up here too. You will have to rename the math.h file in the FL directory to donotloadmath.h. Also, please tell me a bit of your overall goal: the reasons that brought you to FLTK and code::blocks. Best regards, Frank |
|
#8
|
|||
|
|||
Re: use fltk with code::blocksHi Frank!
I entered in the section edit profile but I didn't find where to enable the private message feature. I would like you to send me all you told me about and if you can explain me as much as you can. I tell you a bit about me. I have finished my carreer in Computer Science in Argentina 15 days ago and now I am working in an enterprise in France. As I have to develop using C++ (I was asked to do that) I started looking in internet for tools that I can use without making the enterprise pay for its licence. But I have a lot to learn, I have never developped a real software, up to now it has been only some small projects for the University. So I would be pleased with any help you can give me. I don't understand why I need the library compiled for mingw and also for visual studio. Can you explain me. Sorry for my ignorance. But I really want to learn and that's why I ask a lot Waiting for your news, Pam. |
|
#9
|
|||
|
|||
Re: Use FLTK with code::blocksPam,
Just click on "Receive Email from Other Members" in your profile edit options menu. http://www.gidforums.com/profile.php?do=editoptions Quote:
Quote:
http://www.microsoft.com/express/vc/ It should be free and does not contain MFC, which is where the FLTK GUI development should come in. I like FLTK because it could be targeted for Window$, Linux and MacOS X. You should also seriously consider http://www.wxwidgets.org/, which is as versatile as FLTK. Looking at their forum, it looks as if the help out there might be better than for FLTK. http://wxforum.shadonet.com/. I already have a lot of code written on FLTK so for the current project I am on, I will have to finish it with FLTK. For my next project, I will definately try out wxWidgets. For FLTK examples, be sure to check out Erco's cheat page http://seriss.com/people/erco/fltk/ and his videos http://seriss.com/people/erco/fltk-videos/. You can learn a lot fast by playing / pausing the video and doing the same code in another window. I would recommend that you get some books like Effective C++ by Scott Meyers, to use as a reference to complement what you learned at school. Frank |
|
#10
|
|||
|
|||
Re: Use FLTK with code::blocksHi Frank,
I have already made available the option for receiving mails. I have another question, what you meant in your last answer is that you are using Visual C++ express edition instead of Code::Blocks? Well, I hope now you can send me the information See you... Pam |
Recent GIDBlog
Non-US citizens serving in the military by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fluid with Code::Blocks tutorial | bluekid | FLTK Forum | 4 | 25-Aug-2006 06:52 |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| GIMcontacts - a gim fltk fluid venture | cable_guy_67 | FLTK Forum | 0 | 14-Feb-2005 14:18 |
| FLTK with GLUT | usmsci | FLTK Forum | 4 | 26-Nov-2004 16:21 |
| Welcome to the FLTK Forums | dsmith | FLTK Forum | 0 | 08-Sep-2004 06:58 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The