Error with Module

BlitzMax Forums/BlitzMax Module Tweaks/Error with Module

Zumwalt(Posted 2006) [#1]
What does it mean when it says
"Compile Error"
"Module does not match commandline module"


Brucey(Posted 2006) [#2]
It means you are performing a "Build" (ctrl - B) on a module, rather than running "Build Modules" (ctrl - D).

Modules will only compile when you Build Modules as the compiled output is intended to be a library (.a) file rather than an executable.

HTH


N(Posted 2006) [#3]
If your module's source code line that specifies its module namespace and name (e.g., "Module Cower.LibIL") doesn't match its physical path (e.g., "cower.mod/libil.mod/libil.bmx") then you will get that error. The definition in the module source code must match that the physical path.


Zumwalt(Posted 2006) [#4]
Its not the first, when I use ctrl-D, I end up with :

Building Modules
Compiling:win32htmlview.cpp
C:/Program Files/BlitzMax/mod/brl.mod/win32maxgui.mod/win32gui/win32htmlview.cpp:41: error: redefinition of `struct IHTMLFramesCollection2'
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mshtml.h:461: error: previous definition of `struct IHTMLFramesCollection2'
C:/Program Files/BlitzMax/mod/brl.mod/win32maxgui.mod/win32gui/win32htmlview.cpp:62: error: redefinition of `struct IHTMLWindow2'
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mshtml.h:478: error: previous definition of `struct IHTMLWindow2'
Build Error: failed to compile C:/Program Files/BlitzMax/mod/brl.mod/win32maxgui.mod/win32gui/win32htmlview.cpp
Process complete

Which has nothing to do with my gg.mod
The second I will look into, but that seems off also, since

C:\Program Files\BlitzMax\mod\gg.mod\_3impact.mod
Has a _3impact.bmx in that folder.

In the bmx file I have:
Strict
Rem

bbdoc: 3Impact interface lib
End Rem
Module gg._3Impact


The problem is, the file that I am trying to use the module in, acts like the module just does not exist anywere at all.

Strict
Framework gg._3Impact

I have even tried:
Strict
Module gg._3Impact

Neither of which work and give the same compile error.

Forgot to mention, my lib folder does contain the (a) files:
libdll3impact.a
libdll3impactd.a


tonyg(Posted 2006) [#5]
Possibly?
maybe?
What happens when you don't specify any framework or module? What happens when you use Import?
What level of MingW are you using?


Zumwalt(Posted 2006) [#6]
From my post:
mingw32/3.4.2/

So for Mingw, version 3.4.2, listed in the thread.

As per your second suggestion, with I do not specifiy a framework or module, I get

"Compile Error"
"Type '_3IEngine' not found"


tonyg(Posted 2006) [#7]
Did you make any of the changes suggested in those links?
Have you tried with MinGW
Did you see this ?
For some reason BRL removed the MinGW recommended level and install instructions. Most of the searches on MingW have an Internal Error response but I think it pointed to 3.1.0 which is what I still use and seems to work OK.


Dreamora(Posted 2006) [#8]
MingW 3.1.0.1 is needed.
Using newer GCC Versions (especially the one that comes with DevC++) does not work and will fail on compile (normally already on something_app.c)


N(Posted 2006) [#9]
Using newer GCC Versions (especially the one that comes with DevC++) does not work and will fail on compile (normally already on something_app.c)


Works fine for me.


TomToad(Posted 2006) [#10]
Here's instructions for installing MinGW v3.1.0-1.
http://www.blitzbasic.com/Community/posts.php?topic=60031#669654


Zumwalt(Posted 2006) [#11]
I got MinGW 3.4.2 to compile by following the instructions to rem out the #IFNDEF sections, however, even with the modules all successfully compiled (including the _3Impact), I get the same error as that of which I got when I started this process of trying to resolve the error.

So that said, I'll try to roll back my MinGW to v3.1.0-1 and compile the modules to see if the :
"Compile Error"
"Module does not match commandline module"

Goes away or not. I still don't think that the BlitzMAX is recognizing the gg._3Impact module, and everything is in place the way it should be.


tonyg(Posted 2006) [#12]
Any of these...
One
Two
Three


Zumwalt(Posted 2006) [#13]
None of those 3, but I have the solution now.

Rules for modules that is undocumented:
1) _# is not allowed in a name, meaning your module can't have _3Impact, just by renaming it to impact.mod from _3impact.mod for the file name, then updating the impact.mod file so that it has: Module gg.impact
2) use Rebuild all modules, make sure you have a good complete compile for your module, you can still get a good complete compile with an _ in the module name, but that doesn't mean jack didley.
3) Unlike C code, in your file name strings, do not use "folder\\folder\\file", just use single "\"

More details later, I will type it all up.


Dreamora(Posted 2006) [#14]
the _ is no problem. But if you read the docs carefully it is clearly stated that the first sign in a variable (and a module name is a variable as well) MUST be a character.

And for files, you better use / ... that way it works on all 3 OS, not only on windows.


Zumwalt(Posted 2006) [#15]
Thanks for the tip. I'll avoid _ anyway, regardless. My stuff works without it, and doesn't work with it, so I will go with the working :)


Zumwalt(Posted 2006) [#16]
http://www.hawk-systems.net/portal/forums/thread-view.asp?tid=5&posts=1#M7

Plug to use 3Impact and BlitzMax together. Thanks to TomToad from these forums and gman for his contribution from 3Impact forums.