| 220 | | @subsubheading Compilation |
| 221 | | |
| 222 | | @itemize @bullet |
| | 220 | @subsubheading Building |
| | 221 | |
| | 222 | @itemize @bullet |
| | 223 | @item |
| | 224 | Q1. @emph{I'm using the Visual C++ 2005 Express Edition and I get a lot of |
| | 225 | ``file not found'' errors for @file{windef.h} and others. What is wrong?} |
| | 226 | Q2. @emph{I'm using the Visual C++ 2005 Express Edition and I get a lot of |
| | 227 | ``unresolved symbol'' errors for names like |
| | 228 | @code{SHGetSpecialFolderLocation@@12}. What is wrong?} |
| | 229 | |
| | 230 | A. These errors indicate a lacking or an incomplete installation of the |
| | 231 | Platform SDK. Exactly follow the instructions given on Microsoft's |
| | 232 | ``Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK'' |
| | 233 | page: |
| | 234 | @ifnottex |
| | 235 | @uref{http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/} |
| | 236 | @end ifnottex |
| | 237 | @iftex |
| | 238 | @code{http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/} |
| | 239 | @end iftex |
| | 240 | Also, the instructions don't say that, but if you have Visual C++ open while |
| | 241 | applying those changes you need to restart it. |
| | 242 | |
| 239 | | The resources from these packages should be placed in the following locations. |
| | 259 | @item |
| | 260 | Q. @emph{Where are the files @file{libpng.lib} and @file{zlib.lib}?} |
| | 261 | |
| | 262 | A. Just look above at the question about @file{zlib.h} and @file{png.h}. |
| | 263 | It's the same problem, and if you have already done what is explained there, |
| | 264 | I can't do much for you! |
| | 265 | |
| | 266 | @item |
| | 267 | Q. @emph{I've got unresolved symbols.} |
| | 268 | |
| | 269 | A. What kind of symbols? |
| | 270 | |
| | 271 | @itemize @minus |
| | 272 | @item |
| | 273 | @samp{_png_@dots{}}: That means that you don't link the project with |
| | 274 | @file{libpng.lib}. Just take a look below where it is explained how to do so. |
| | 275 | |
| | 276 | @item |
| | 277 | @samp{_inflate@dots{}} and @samp{_deflate@dots{}}: Well, it seems to your |
| | 278 | project lacks @file{zlib.lib}. The trick is explained just below, so hang on. |
| | 279 | |
| | 280 | @item |
| | 281 | @samp{_DirectDraw@dots{}}: Same as above, but for @file{ddraw.lib} (DirectX |
| | 282 | component), look below. |
| 255 | | @end itemize |
| 256 | | |
| 257 | | @subsubheading Linking |
| 258 | | |
| 259 | | @itemize @bullet |
| 260 | | @item |
| 261 | | Q. @emph{Where are the files @file{libpng.lib} and @file{zlib.lib}?} |
| 262 | | |
| 263 | | A. Just look above at the question about @file{zlib.h} and @file{png.h}. |
| 264 | | It's the same problem, and if you have already done what is explained there, |
| 265 | | I can't do much for you! |
| 266 | | |
| 267 | | @item |
| 268 | | Q. @emph{I've got unresolved symbols.} |
| 269 | | |
| 270 | | A. What kind of symbols? |
| 271 | | |
| 272 | | @itemize @minus |
| 273 | | @item |
| 274 | | @samp{_png_@dots{}}: That means that you don't link the project with |
| 275 | | @file{libpng.lib}. Just take a look below where it is explained how to do so. |
| 276 | | |
| 277 | | @item |
| 278 | | @samp{_inflate@dots{}} and @samp{_deflate@dots{}}: Well, it seems to your |
| 279 | | project lacks @file{zlib.lib}. The trick is explained just below, so hang on. |
| 280 | | |
| 281 | | @item |
| 282 | | @samp{_DirectDraw@dots{}}: Same as above, but for @file{ddraw.lib} (DirectX |
| 283 | | component), look below. |
| 284 | | |
| 285 | | @item |
| 286 | | Any others: Well, I always have a solution, but this one is more difficult. It |
| 287 | | seems that there is a missing source file in your project. But the question |
| 288 | | is, which source file? If it isn't obvious by the name of the functions, just |
| 289 | | to the following: In the menu @emph{Edit}, select the option @emph{Find in |
| 290 | | Files@dots{}}. Put the name of the function in the field ``Find What'', check |
| 291 | | that the ``In Folder'' field content is the Crystal Space source directory and |
| 292 | | press @emph{Find}. You should get a bunch of files, many of them just making a |
| 293 | | call to the function. But there is surely one which contains the definition of |
| 294 | | the function. Look at the position of the file where it is defined, and add it |
| 295 | | to the project (menu @emph{Project/Add To Project/Files}). |
| 296 | | |
| 297 | | In order to add (or remove) a library for the link process, invoke the |
| 298 | | @emph{Project/Settings/Link} menu item, then select the ``General'' category |
| 299 | | tab.. There is a field called ``Object/Library Modules'' that lists all the |
| 300 | | libraries added to the project at link time. |
| 301 | | @end itemize |
| 302 | | @end itemize |
| 303 | | |
| 304 | | OK, now it should link. So you should have an executable file called |
| 305 | | @file{walktest.exe} in your src directory. Let's run it! |
| | 298 | |
| | 299 | @item |
| | 300 | Any others: It seems that there is a missing source file in the project. |
| | 301 | |
| | 302 | For Crystal Space the MSVC project files are generated once every 24 hours, so |
| | 303 | normally all missing sources should have been added after that time. If you |
| | 304 | can't wait that long, or the file is still missing, contact one of the Crystal |
| | 305 | Space developers. |
| | 306 | |
| | 307 | For third party projects it's usually the best idea to contact one of it's |
| | 308 | developers, they should be able to tell you which file is missing. |