Re: Help getting linking to work and ...
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Wink Saville wrote:
> I'm just starting to try aap and has almost got my first program
> compiling/linking using the following recipe:
>
> <recipe>
> :usetool msvc
>
> :variant Build
> debug
> OPTIMIZE = 0
> DEFINE += -DPK1_DEBUG
> LIBS += -l../../../Pk1/lib/libtmpk1_WinX86_g.lib
> release
> OPTIMIZE = 4
> DEFINE += -DPK1_NDEBUG
> LIBS += -l../../../Pk1/lib/libtmpk1_WinX86.lib
>
> INCLUDE += -I./inc -I../../../Misc/comp/tmAardvarkIic/inc -I../../../App/inc
> -I../../../Pk1/inc DEFINE += -DTARGET_WINX86_PK1 SRCPATH = ./src
> ../../../Misc/comp/tmAardvarkIic/src
> srcs $= SetSim1.c aardvark.c
>
> :program SetSim1 : $srcs
> </recipe>
>
> The first problem is I get the following error message, but it does compile
> source files SetSim1.c and aardvark.c:
>
> <error_message>
> 'cc' is not recognized as an internal or external command, operable program
> or batch file.
> Warning: could not test C compiler for being GCC: Error in recipe
> "c:/program files/aap/exec/default.aap" line 89: Shell returned 1 when
> executing:
> cc -E c:\docume~1\wink~1.sav\locals~1\temp\tmpdxrbad.c >
> c:\docume~1\wink~1.sav\locals~1\temp\tmpu6shuv
> </error_message>
This is harmless: The "cc" compiler can't be found. The message will be
annoying when you get it each time. I'll change it into only putting
the message in the log file. I can't avoid the "is not recognized..."
message though.
> The "real" problem is that it won't link in my libraries and I get a bunch
> of unresolved externals. The link command only has SetSim1.obj and
> aardvark.obj not my libraries:
>
> <link>
> Aap: link /nologo /out:SetSim1.exe src\build-nt-debug\SetSim1.obj
> ..\..\..\Misc\comp\tmAardvarkIic\src\build-nt-debug\aardvark.obj
> </link>
The "msvc" tool currently doesn't use $LIBS. It's easy to add:
*** tools/msvc.py~ Fri Sep 5 16:58:43 2003
--- tools/msvc.py Wed Oct 29 12:09:59 2003
***************
*** 48,54 ****
rpstack = [ RecPos("build_msvc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "build_msvc object"),
! ":sys $MSLINK $LINKFLAGS /out:$target $source")
if not rd.get("MSLINK"):
rd["MSLINK"] = "link"
if not rd.get("LINKFLAGS"):
--- 48,54 ----
rpstack = [ RecPos("build_msvc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "build_msvc object"),
! ":sys $MSLINK $LINKFLAGS /out:$target $source $?LIBS")
if not rd.get("MSLINK"):
rd["MSLINK"] = "link"
if not rd.get("LINKFLAGS"):
Please let me know if this works as expected.
--
Two cows are standing together in a field. One asks the other:
"So what do you think about this Mad Cow Diesease?"
The other replies: "That doesn't concern me. I'm a helicopter."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/