I am using FbEdit, Win 8,
When I run Nehe examples by directly loading an example, it compiles and run fine. But when I use SDL files or the Dll example, I get this:
C:\FreeBASIC\bin\win32\ld.exe: cannot find -lSDL
or this:
C:\FreeBASIC\bin\win32\ld.exe: cannot find -lmydll
There is something I don't know here, documentations and tutorial not helpful in this case. Need help.
problem with compiling
Re: problem with compiling
sorry not complete, read next ...
Last edited by MrSwiss on Aug 11, 2014 16:05, edited 2 times in total.
Re: problem with compiling
Hi,
if it says in the source something like:
'' mydll.bas MUST BE COMPILED FIRST (as DLL) --> fbc -dll mydll.bas
then, if you don't do that, you'll be getting compile faults like you mentioned above:
because the Linker (LD.exe) expects the DLL to be made allready.
There is nothing wrong with the documentation!
if it says in the source something like:
'' mydll.bas MUST BE COMPILED FIRST (as DLL) --> fbc -dll mydll.bas
then, if you don't do that, you'll be getting compile faults like you mentioned above:
because the Linker (LD.exe) expects the DLL to be made allready.
There is nothing wrong with the documentation!
Re: problem with compiling
Thanks,
For sure nothing wrong with documentation.
Yes, it says, I didn't read the source code carefully, just ran the program. OK, I compiled the dll and it works now.
How about the SDL examples? I picked mouse example. It seems I need SDL.dll. Should I compile it myself or it is precompiled somewhere for download?
For sure nothing wrong with documentation.
Yes, it says, I didn't read the source code carefully, just ran the program. OK, I compiled the dll and it works now.
How about the SDL examples? I picked mouse example. It seems I need SDL.dll. Should I compile it myself or it is precompiled somewhere for download?
Re: problem with compiling
Hi,
SDL is a popular graphics library, you can download it from their homepage:
https://www.libsdl.org/
For more information about what to download:
http://www.freebasic.net/forum/viewtopi ... 68#p197768
SDL is a popular graphics library, you can download it from their homepage:
https://www.libsdl.org/
For more information about what to download:
http://www.freebasic.net/forum/viewtopi ... 68#p197768
Re: problem with compiling
OK, I got SDL 1.2 binary which has the dll for win32, now the example works. Thanks. So, answer to my question is: you need SDL.dll, which is not automatically provided.
Re: problem with compiling
Working with external librarys (statically or dynamically linked) is in most
programming languages very similar.
The reason for those external binarys/source code not beeing part of the
fbc-package may vary, possible reasons beeing:
- licensing
- other restrictions
- it simply is a question of size, maintainability or any combination therof.
programming languages very similar.
The reason for those external binarys/source code not beeing part of the
fbc-package may vary, possible reasons beeing:
- licensing
- other restrictions
- it simply is a question of size, maintainability or any combination therof.