Bugs item #1078636, was opened at 2004-12-03 22:46
Message generated for change (Comment added) made by drieseng
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1078636&group_id=31650
Category: Tasks
Group: 0.85
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Hani Atassi (haniatassi)
>Assigned to: Gert Driesen (drieseng)
Summary: Solution task doesn't do MFC shared apps.
Initial Comment:
I found out that the <solution> task doesn't compile the
MFC application correctly.
Basically, it's not adding the compiler
switch /D "_AFXDLL" or the necessary switches for MFC
configuration when compiling.
I will try to come up with a fix soon, if no one has a fix
for this.
To Reproduce:
- Create any MFC solution using Visual Studio.NET
- Create a simple NAnt build file containg something like
the following:
<target name="build">
<solution configuration="Debug"
solutionfile="NAntMFCTest.sln" />
</target>
- Run NAnt on the script..
You would get the following errors:
1- It won't compile the resource files. This is fixed by a
previous bug (ID: 1077712)
2- The link will fail because of unresolved external
symbols.
----------------------------------------------------------------------
>Comment By: Gert Driesen (drieseng)
Date: 2004-12-08 08:54
Message:
Logged In: YES
user_id=707851
Your patch has now been committed to cvs, with minor
modifications.
Thanks a lot !!!
----------------------------------------------------------------------
Comment By: Hani Atassi (haniatassi)
Date: 2004-12-06 23:46
Message:
Logged In: YES
user_id=590187
Attach is two solutions: One is an MFC dialog based
solution that is dynamically linked with MFC. Without
defining _AFXDLL, you will get bunch of linker errors. The
other solution is an ATL dll that is linked dynamically
with ATL. Also, without defining _ATL_DLL you would get
bunch of linker errors.
I also noticed that Visual Studio adds the defintion
_ATL_STATIC_REGISTRY in case of ATL static linking. So,
you probably need to add the following code to my fix
after testing shared ATL:
} else if (baseConfig.UseOfATL ==
NAnt.VisualCpp.Types.UseOfATL.Static) {
clTask.Arguments.Add(new Argument("/D"));
clTask.Arguments.Add(new Argument
("_ATL_STATIC_REGISTRY"));
}
Hope this helps...
----------------------------------------------------------------------
Comment By: Hani Atassi (haniatassi)
Date: 2004-12-06 23:42
Message:
Logged In: YES
user_id=590187
Attach is two solutions: One is an MFC dialog based
solution that is dynamically linked with MFC. Without
defining _AFXDLL, you will get bunch of linker errors. The
other solution is an ATL dll that is linked dynamically
with ATL. Also, without defining _ATL_DLL you would get
bunch of linker errors.
I also noticed that Visual Studio adds the defintion
_ATL_STATIC_REGISTRY in case of ATL static linking. So,
you probably need to add the following code to my fix
after testing shared ATL:
} else if (baseConfig.UseOfATL ==
NAnt.VisualCpp.Types.UseOfATL.Static) {
clTask.Arguments.Add(new Argument("/D"));
clTask.Arguments.Add(new Argument
("_ATL_STATIC_REGISTRY"));
}
Hope this helps...
----------------------------------------------------------------------
Comment By: Gert Driesen (drieseng)
Date: 2004-12-06 19:35
Message:
Logged In: YES
user_id=707851
Hani, can you also attach a small test solution to this bug
report ?
For now, I'll probably add the enums to the
NAnt.VSNet.Types namespace.
----------------------------------------------------------------------
Comment By: Hani Atassi (haniatassi)
Date: 2004-12-06 16:55
Message:
Logged In: YES
user_id=590187
DESCRIPTION: NAnt.VSNet.VcConfiguration doesn't read the
attribute values UseOfMFC and UseOfATL from the project file.
RESOLUTION: My proposed solution is the following:
1- Add new types in the namespace (NAnt.VisualCpp.Types)
call them UseOfATL and UseOfMFC
2- Read these type inside VcConfiguration constructor
3- Use the type when compiling files to add the definition /D
_AFXDLL or /D _ATL_DLL
I attached a file with the proposed changes.. Hope this helps..
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1078636&group_id=31650
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers