Re: Help getting linking to work and ...

"Wink Saville" <wink-hKg/[email protected]>
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Putting the anoyning message to the log file would be good.

the $?LIBS worked except the linker doesn't want the "-l", appended to the
front of the library name. From the docs it implies it should be there, but
the libraries aren't, in general portable, but it would seem consistency
would say we should include and then it should be stripped if not needed by
the tool?

Of course after that the next problem is the program needs to be compiled &
linked with the multi-threaded is there a "portable" variable like for
enabling multi-threading?

Thanks,

Wink

"Bram Moolenaar" <[email protected]> wrote in
message news:200310291123.h9TBN2Tu013037-P8e1GJ7cMh39ABcEjJio/[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/





-------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.