Build Error

BlitzMax Forums/Brucey's Modules/Build Error

sswift(Posted 2009) [#1]
Build Error: Failed to link C:/Program Files/BlitzMax/myprojects/Seamless Texture Generator 2/speedtest.exe

C:/Program Files/BlitzMax/bin/ld.exe: cannot find C:/Program Files/BlitzMax/mod/pub.mod/freeimage.mod/freeimage.release.win32.x86.a


I get this even when I try to compile an app that doesn't even make use of the freeimage mod. What's going on?


Brucey(Posted 2009) [#2]
mod/pub.mod/freeimage.mod/

It's not a "pub" module.

By definition, bah.freeimage will have this location :
BlitzMax/mod/bah.mod/freeimage.mod/...



sswift(Posted 2009) [#3]
Okay, but I must have put it in the pub folder for some reason. I can't remember why though. What do all those mod directories mean?

I think the reason I put it there was I was trying to dtermine where to put it and I read somewhere that user created modules should go in the pub directory.


By definition, bah.freeimage will have this location :


Where is it called bah.freeimage? I see freeimage.mod, I see freeimage.bmx, I see ... oh, well... there it is at the top of the module source.

But like I'm gonna look there first! :-)


Sorry, I just don't install modules very often. I'd started looking for whatever C compiler people kept telling me to install a while back because I thought that was what I might be missing. :-)


Wiebo(Posted 2009) [#4]
The mod directories are there for one purpose only: keep things tidy.
But also to dictate namespaces. Maybe this blog entry of me will shed some light? http://wiebo.wordpress.com/2009/01/01/how-to-install-mingw-to-compile-modules-for-blitzmax-2/


Htbaa(Posted 2009) [#5]
The namespace is actually a bit of a false statement, as BlitzMax doesn't like it when there are modules/types with the same name in different namespaces.


sswift(Posted 2009) [#6]
Well there must be something more to it than keeping tidy since the code wouldn't compile if it was in the wrong directory. :-)


Brucey(Posted 2009) [#7]
the code wouldn't compile if it was in the wrong directory

Actually, it simply ignores it if it is in the wrong place.


Wiebo(Posted 2009) [#8]
I know the namespace bit is a bit 'not true' but if you follow the rule, the modules WILL compile. It works for me to deduce where to put things, and what to enter when using bcc or mingw. But like some other OOP things in Blitz Max, the namespace idea is not implemented 100% which leads to things like this.


Brucey(Posted 2009) [#9]
There's a bit of a "bug" in the underlying implementation of the basic namespace stuff - hence the potential issue if you name something the same (for example BRL.Random and BaH.Random).

Of course in the example I mention, you would be expected to choose one OR the other. Of course, issues arise if you then want to include BRL.Retro, which includes BRL.Random in a roundabout way (via BRL.Basic I think)... so sometimes you need to be careful.

But otherwise, there are enough words in our combined languages to generally not have to worry too much about namespace clashes. On the otherhand, I blame the module-writers if it goes horribly wrong :-p