User forums > Using Code::Blocks
CodeBlocks, VC-Tools2003 and SDL
atom:
Sorry, that I'm not very specific. The problem is, that I'm not very experienced with compiler setups in C. I try to explain some more and maybe I will have some time later on, to retry with the info from the other thread.
Goal:
I would like to use SDL in a project and thus have to include "SDL.h". SDL itself is a .dll.
Way so far:
Installing VST2003 and the newest beta of codeblocks is no problem. I was able to compile and run the minimal "console application" code from within codeblocks.
I added the "SDL.h" to the code, added the include-dir to compiler dirs and library-dir to the linker-dirs.
I did not install the additional "windows-kit", though I'm not so shure anymore if SDL won't make use of windows-gui?
Problem:
Now, I don't know what to do next? Do I have to add the library-files to the project, or just enter them in linker-options? And if so, what exactly do I enter there?
atom
mandrav:
Unfortunately, to build any program making use of the Windows API (SDL is one of them) using the MS VC Toolkit, you will have to download and install the MS Platform SDK. It's a hefty download, minimum of 100+ MB and full is around 300+ MB, if I recall correctly...
Or, you can order a free (I think) CD from Microsoft.
Your other option is to use another compiler, like MinGW, which contains the Windows API headers and libraries.
Anyway, after your setup is OK, you will have to add the SDL libs in the linker options. For MinGW add "-lSDL_main -lSDL" and for MS VC Toolkit add "SDL_main.lib SDL.lib" (I haven't tried that!).
HTH,
Yiannis.
atom:
Thanks. It seems, that mingW is the better choice then. I will give it a try soon and post my results.
Anonymous:
--- Quote from: mandrav ---...In the build options window, go to the linker options tab and remove the "/l" from the above options that give you errors (you might as well append ".lib" to each of the above).
--- End quote ---
You have another slight bug in that linker tab text box. With the following items in it:
-lstdc++
-lgcc
-lgdi32
-lcomdlg32
-lodbc32
-lwsock32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lctl3d32
-ladvapi32
-lopengl32
user32.lib
the text box somehow auto-scrolls down so that only the user32.lib is showing. A quick glance only shows user32.lib, and a not-so-quick glance shows the same thing. But when you click on the scrollbar (which is sized and positioned incorrectly for this scroll position), all of them appear except the user32.lib, which is hidden under the bottom.
All in all, I am _very_ impressed! You have done a lot of work on this, and it is a pretty cool tool. Thanks!
David
mandrav:
--- Quote ---the text box somehow auto-scrolls down so that only the user32.lib is showing
--- End quote ---
Yes, this I believe is a bug in wxWidgets. I can't make anything to make the text box show the contents correctly :(
It also happens in all other text boxes in that window.
I 've not given up on it yet, though ;)
Yiannis.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version