News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

winmaincrtstartup

Started by shankle, December 25, 2007, 04:48:55 AM

Previous topic - Next topic

shankle

Went to a program of several years ago to make a small change and
the "winmaincrtstartup" reared its ugly head. The program is written in
Masm32. The code to link follows and works on many other programs.
The posts here on this topic do not really answer the question.

if exist %1.obj del %1.obj
if exist %1.exe del %1.exe
\masm32\bin\ml /c /coff %1.asm
if not exist %1.obj goto END
echo %1.obj created
\MASM32\BIN\Link /SUBSYSTEM:WINDOWS %1.obj
if not exist %1.exe goto END3
echo %1.exe created
echo GOOD COMPILE & LINK
goto TheEnd 
:END3
echo %1.exe file not created
goto TheEnd
:END
echo %1.obj file not created
:TheEnd

Thanks for any help,
JPS
The greatest crime in my country is our Congress

MichaelW

I don't know exactly what problem you are having, but I have noticed that I can trigger a:

LINK : error LNK2001: unresolved external symbol _mainCRTStartup

By not specifying a start address on the END directive.
eschew obfuscation

ToutEnMasm

Hello,
This mean that the source code is writen with a standard C entry point and not a standard masm entry point.
masm entry point:
Quote
.code
start:
end start
c entry point:
Quote
.code
anyproc proc
anyproc endp
WinMain proc STDCALL public uses esi edi ebx, hInst:DWORD,hPrev:DWORD,\
                        lpCmdLine:DWORD,nShowCmd:SDWORD
WinMain endp
end

shankle

Thanks guys.
Problem fixed.
I wrote the program on Windows 98 2nd ed.
Maybe that's why I got away with the error
and XP won't.
JPS
The greatest crime in my country is our Congress

shankle

Correction. My last statement is incorrect.
The problem is fixed but the cause is not Windows 98.
This is a good example of why good notes are so important.

Program A includes a module BB. BB can not have a "Start or END START"
statement in it. BB can not be compiled but must be put in the include
lib with a makelib.bat.
The greatest crime in my country is our Congress