Module Building, and MinGW
Archives Forums/Win32 Discussion/Module Building, and MinGW
| ||
Since under Windows, you need minGW to compile modules, does this let us link Assembled files ex "DragosLib.a" into the modules, or will we have to wait to a future update to bea ble to do this? |
| ||
(Edited crap: didn't notice fasm was in the beta!) |
| ||
Hi, Should work as-is. Try creating and importing a '.s' file. |
| ||
Yup. GCC (which is the base of mingw) is able to compile : .c (C sourcecode) .s (ASM sourcecode) .cpp (C++ sourcecode) and some others (fortran 77 and a few things I saw in gcc's man page). |
| ||
strange thing is I haven't GCC or MingW installed ( anymore. Had with DevC++ ) and BMax works ... straange but good that it works :) |
| ||
* 'Build modules' requires MINGW to be installed under Win32. You will also need to add mingw/bin to your PATH env variable and add an env variable called MINGW pointing to the root mingw dir. How do you do the above. I installed MinGW to c:\MinGW. How do I set up paths and stuff because I cant seem to build modules? [edit] this is the error I get when I try to build modules after syncmod. Building Modules Compiling:blitz_app.c 'gcc' is not recognized as an internal or external command, operable program or batch file. Build Error: failed to compile C:/Applications/Coding/BlitzMaxBeta/mod/brl.mod/blitz.mod/blitz_app.c Process complete Please help. |
| ||
@Amon: It depends on your system... Win9x : Edit C:\AUTOEXEC.BAT and add the path to "bin" directory of MingW to the PATH eg. if you have : set PATH=C:\;C:\WINDOWS Change it to : set PATH=C:\;C:\WINDOWS;C:\Mingw\bin Now if you have Win2k (should work also with WinMe/Xp/NT/etc...) : Right click "My Computer" Select "Properties" Open tab "Advanced" Click "Environnement Variables" Search for the variable "PATH" Click "Modify" Add to the end : ";C:\Mingw\bin" (without the quotes) And *DON'T* post on other topics to ask help ! |
| ||
Thx for the help :) It works now :) |
| ||
Should I install Fasm or MINGW ? If Fasm, which version ? The WIN32 console one, or the WIN32GUI ? Please elaborate... Sergio. |
| ||
not sure if this is intentional or not, but there's a fasm.exe in the bin directory of the Beta. |
| ||
Yes you're right, I didn't notice. Does that means we don't need to install any MingW/fasm ? I'm a bit confused... Also, I'm skeptical about this syncronization method, since it does not work if your internet connection goes through a proxy; anyway, could we also have a traditional installer to be downloaded from the account page, as we always did with the previous Blitz versions ? What's the advantage of this sync in respect to the download ? Sergio. |
| ||
Should I install Fasm or MINGW ? Just MinGW. What's the advantage of this sync in respect to the download ? Instant gratification? |
| ||
thanks for the replys. got some more questions. Why can't we include headers, ie .h. and how do I set an external function that is in a class. ie class cNumber { public: DoubleMe() { me+=me;) int GetMe() {return me;} private; cNumber() { me=1;} int me; } so in Max i have. import "number.cpp" extern function GetMe%() function DoubleMe() end extern I have also tried import "number.cpp" extern function cNumber:GetMe%() function cNumber:DoubleMe() end extern and it responds with "Identitfier GetMe not found" |
| ||
Unfortunately there is no C++ object support at this time so you need to build C style wrappers for your methods and declare them as Extern "C" in your headers to avoid C++ name mangling headaches. I think also from BlitzMax you need to declare the extern block as win32 like this to get correct Windows linkage: Extern "win32" Function timeGetTime() End Extern |
| ||
Unfortunately there is no C++ object support at this time Any idea when this will be supported (you say 'at this time' so I assume it's a feature that will be included with some update)? |
| ||
ahh, ok, so I have to make a wrapper for it, hmm will there be proper c++ support in the future? |
| ||
ahh, ok, so I have to make a wrapper for it, Will there be proper c++ support in the future? |