Hi:
Long time no see everybody. I am now an open-source enthusiast.
In the OBJASM32 website, it says we can also use open-source JWASM to build OBJASM32 project,
so I tried to modify RADASM's project options, use JWASM, PORC, POLINK instead of ML, RC and LINK.exe
However, I failed. Could anyone give me a specific example of how to use the open-source alternative to
build OBJASM32?  Thank you!

This is what I encountered when building Demo01.rap:(I copied JWASM.EXE to masm32 directory)

C:\Masm32\Bin\JWASM.EXE  /c /coff /nologo /I"C:\Masm32\Include" "Demo01A.asm"
STRING TYPE: ANSI
DEBUG MODE : ACTIVE -> WND
OOP LEVEL  : PRIMER ONLY
- Primer.inc

Inheritance path: Primer
Demo01.inc(25) : Warning A4136: Symbol type conflict: TPL_Primer
ObjectEnd(43): Macro called from
 Demo01.inc(25): Included by
  IncludeObjectSrc(3): Macro called from
   MakeObjects(1): Macro called from
    Demo01A.asm(12): Main line code
Inheritance path: Primer,Shape
Demo01.inc(31) : Warning A4136: Symbol type conflict: TPL_Shape
ObjectEnd(43): Macro called from
 Demo01.inc(31): Included by
  IncludeObjectSrc(3): Macro called from
   MakeObjects(1): Macro called from
    Demo01A.asm(12): Main line code
Inheritance path: Primer,Shape,TriangleShape
Demo01.inc(39) : Warning A4136: Symbol type conflict: TPL_Shape
ObjectEnd(43): Macro called from
 Demo01.inc(39): Included by
  IncludeObjectSrc(3): Macro called from
   MakeObjects(1): Macro called from
    Demo01A.asm(12): Main line code
Inheritance path: Primer,Shape,RectangleShape
Demo01A.asm(21) : Warning A4136: Symbol type conflict: TPL_TriangleShape
New(3): Macro called from
 Demo01A.asm(21): Main line code
Demo01A.asm(28) : Warning A4136: Symbol type conflict: TPL_RectangleShape
New(3): Macro called from
 Demo01A.asm(28): Main line code
Demo01A.asm: 48 lines, 2 passes, 174 ms, 5 warnings, 0 errors
C:\Masm32\Bin\POLINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /VERSION:4.0 /LIBPATH:"C:\Masm32\Lib" /OUT:"Demo01A.exe" "Demo01A.obj"
POLINK: error: Unresolved external symbol '_UStrLength'.
POLINK: fatal error: 1 unresolved external(s).

Make error(s) occured.
Total compile time 566 ms
Posted on 2011-03-12 08:26:58 by guidry
Hi guidry
I use the following RA2 setup for release build:
Assemble:  3,O,$B\JWASM_205b.EXE /W0 /c /coff /Cp /nologo /I"$I",2
Link:  5,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"$L" /OUT:"$5",3,4

and for debug build:
Assemble:  3,O,$B\JWASM_205b.EXE -Zg /W0 -Zd /Zi /c /coff /nologo /I"$I",2
Link:  5,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /VERSION:4.0 /LIBPATH:"$L" /OUT:"$5",3,4

I hope it helps  ;)

Regards,

Biterider
Posted on 2011-03-13 09:33:10 by Biterider
Hi~
  Thank you very much. Now I can figure out what to do. Another question, is it possible to use another linker to build OBJASM32 projects instead of MS's LINKER.EXE? Can POLINK be used to link the obj file? If it's possible , how?
    As I mentioned earlier, I am now an open-source enthusiast. I move to Linux for about 2 years. When I learned that there is a Win32 API layer called WINE on which many WIN32 programs can run. The good news is, I successfully test RADASM IDE that can run on my Ubuntu Linux 10.04. For MASM32, ML, RC can run with little problems. The problem is on LINK.EXE. IF I use POLINK, it works much better. Another issue is the license. It seems that MS won't allow MR, RC, LINK.EXE to run on LINUX, so I am trying to find a "legal" to build WIN32 ASM program on LINUX, because I think it would be very cool to build OBJASM32 on diffrent plaform. So, can POLINK be used to link the obj file?
Reguards
:), Guidry
Posted on 2011-03-14 06:09:27 by guidry
Hi guidry
I don't have a Linux installation to help you with the linker, but there are other guys here that can help you with this issue.

Biterider
Posted on 2011-03-14 09:14:25 by Biterider
Another question, is it possible to use another linker to build OBJASM32 projects instead of MS's LINKER.EXE? Can POLINK be used to link the obj file? If it's possible , how?


I don't see any reason why you couldn't. If I'm not mistaken, MASM32 comes with PoLINK now (as well as a build script for using PoLINK).

The problem is on LINK.EXE. IF I use POLINK, it works much better. Another issue is the license. It seems that MS won't allow MR, RC, LINK.EXE to run on LINUX, so I am trying to find a "legal" to build WIN32 ASM program on LINUX, because I think it would be very cool to build OBJASM32 on diffrent plaform. So, can POLINK be used to link the obj file?


I'm glad to hear you're wanting to keep it legal, that seems to becoming more and more rare these days. My suggestion would be to check out Jeremy Gordon's GoDevTools. I've ran them in WINE in the past. Both GoLINK and GoRC are stable enough that you barely even notice a difference in the build times.

Now, just to be thorough in this answer... Don't use WINE for your development environment. As I see it, if you are going to program _for_ Windows, you should program _on_ Windows. You could still carry your program over to WINE later on to run it, but the development process is not the time to have to worry about whether your program is crashing because of something you did wrong or because WINE itself doesn't support those features properly yet. Save yourself a lot of headaches and grab a copy of QEmu or VMWare and toss a copy of Windows 7 on it. At least that way you'll know the Windows environment you are building in is going to work smoothly (if not slowly, lol).

Back to the original answer, tbqh any linker that supports MS-COFF to any extent will work fairly well with Masm/ObjASM. For that matter, you could avoid the VM/WINE Development altogether and just install a cross-compiler edition of mingw32. What's even better is.. you don't have to build it!

sudo apt-get install mingw32-binutils mingw32 mingw32-runtime


Your Ubuntu distribution comes stock with mingw32 in it's aptitude repositories. You can build windows applications straight from the linux console the same way people do with mingw-gcc under Windows. Check out this link to view directions on using mingw with MASM (same rules apply for JWASM). The link discusses using Dev-C++, which is good cause Dev-C++ uses mingw32. :) That way you can use both JWASM and MinGW-GCC under linux natively, or both under windows natively, to build your Win32 applications. :D

Best of luck,
Bryant Keller
Posted on 2011-03-15 03:17:23 by Synfire
Are POLINK and/or GOLINK open source? I would think, if you're using Jwasm, that wlink might be a good choice(?). With some help from a poster on the Nasm forum, I have managed to build Alink on Linux. If you think that would help, I can look up the details. As Synfire suggests, the MinGW tools are more-or-less "intended" to do this - whether they'll work with OBJASM is another question!

Open Source Forever!

Best,
Frank

Posted on 2011-03-15 15:21:10 by fbkotler
Are POLINK and/or GOLINK open source?


No, neither are open source. I doubt PoLink will ever be open source. GoLink on the other hand might end up open source later on. Jeremy mentioned over an email discussion between him, Edgar, and myself that he had been putting some thought into distributing the GoDevTools as open source. At the time he decided he wasn't "finished" with it so he'd keep working on it as an in-house effort. Open source or not, I'm still a huge fan of the Go* line of software when I'm working under Windows. :)

I would think, if you're using Jwasm, that wlink might be a good choice(?).


I can't, in good faith, suggest WLINK to anyone. I remember using it under DOS with Watcom C, I hated it. I came to settle with TLINK/Turbo C during that era of my life. I just don't like the way WLINK works (command line arguments or just doing interactive mode).

With some help from a poster on the Nasm forum, I have managed to build Alink on Linux. If you think that would help, I can look up the details.


Yeah, i didn't even think about ALINK! I used to use ALINK with NASM32 till I was introduced to GoLink.

As Synfire suggests, the MinGW tools are more-or-less "intended" to do this - whether they'll work with OBJASM is another question!


I don't really see how the linker is going to matter in the case of OA32 considering quite a lot of the "magic" of it all is macros. As long as you have access to the standard Win32API it should work flawlessly and that's (as fbkotler said) what "the MinGW tools are more-or-less intended to do".

However, if you do run into any problems building against mingw, let me know. I'll download JWASM and OA32 and give it a once through.
Posted on 2011-03-15 21:35:41 by Synfire
Hi, experts:
    I am so glad the suggestion you provided with. It's very useful for a beginner like me. Thank you so much!
    Honestly speaking I don't really care POLINK and/or GOLINK are open source as long as they agree the developers to use them other than MS Windows platform. I love the OBJASM's concise in writing and compact in the generated .exe size(compared with c++) which is very suitable to develop resident program. But more important thing is that it provides many COM+ support. I've heard MingGW C++, and RADASM32 IDE also supports it. But I don't know how to use MingW to develop COM+ programs, if you know , please tell me how. I am eager to know it. If some information for MsAent, the better.
     Now, back to Win XP platform, though it seems that JWasm can work with POLINk, and this is also the default for RADASM3's JWASm project's setting(POlink,JWASM with GORC), it really doesn't work for OBJAM32 project. I followed Biterider's advice but just change the word  Link.exe to POlink.exe on my WIN XP notebook  using RAD ASM 2.x IDE, I still encounter a program error: "The program POLINK.exe has encountered a serious problem and needs to close. We are sorry for the inconvenience...".  I can't figure out why.  Is something wrong with my setting? Or is POLINK doesn't work in this way? Is there anyone has any successful experience building OBJASM projects with WJASM and any linker except for MS's LINK.exe? If it exists please tell me, thank you.
~Guidry
   
Posted on 2011-03-16 08:04:53 by guidry